Summarizing Sales Data by Region and Product Category
You have a CSV export of order data. Management wants a breakdown: total quantity sold and total revenue, grouped by region and product category. Cancelled orders should be excluded. The output needs to land in an Excel file.
This is a five-minute job in ExploreMyData. Here's the exact pipeline.
Step 1: Import the CSV
Drop your file onto the app. The CSV has these columns:
| order_id | date | region | category | quantity | unit_price | status |
|---|---|---|---|---|---|---|
| 1001 | 2026-03-01 | North | Electronics | 3 | 149.99 | completed |
| 1002 | 2026-03-02 | South | Clothing | 5 | 39.99 | completed |
| 1003 | 2026-03-03 | North | Home | 1 | 299.00 | cancelled |
| 1004 | 2026-03-04 | West | Electronics | 2 | 89.50 | completed |
| 1005 | 2026-03-05 | South | Electronics | 4 | 149.99 | completed |
ExploreMyData auto-detects column types. quantity and
unit_price will be recognized as numeric.
Step 2: Filter out cancelled orders
Add a Filter operation. Set the condition to status != 'cancelled'.
This removes any rows where the order was cancelled before computing totals. In the example above,
order 1003 drops out.
Step 3: Group & Aggregate
This is the core step. Add a Group & Aggregate operation with the following configuration:
- Group by:
region,category - Aggregates:
SUM(quantity)andSUM(quantity * unit_price)as revenue
The revenue aggregate uses a calculated field: quantity * unit_price.
If your data already has a revenue column, you can sum that directly instead.
The result is one row per region-category combination:
| region | category | sum_quantity | revenue |
|---|---|---|---|
| North | Electronics | 3 | 449.97 |
| South | Clothing | 5 | 199.95 |
| South | Electronics | 4 | 599.96 |
| West | Electronics | 2 | 179.00 |
Group & Aggregate configuration
- Group by columns: region, category
- Aggregate 1: SUM(quantity) → sum_quantity
- Aggregate 2: SUM(quantity * unit_price) → revenue
Generated SQL: SELECT region, category, SUM(quantity) AS sum_quantity, SUM(quantity * unit_price) AS revenue FROM data WHERE status != 'cancelled' GROUP BY region, category ORDER BY revenue DESC
Step 4: Export as Excel
Click the Export button and choose .xlsx. The summary table downloads as an Excel file, ready to attach to an email or drop into a shared drive.
Reusing this pipeline next month
The pipeline you just built (Filter, then Group & Aggregate) stays intact in the sidebar. When next month's data arrives, load the new CSV and the same steps apply automatically. Column names need to match, but the data can be any size. A file with 10 rows and a file with 500,000 rows run through the same pipeline with no changes.
If your report needs additional breakdowns (by month, by sales rep), add more columns to the Group By list. The Group & Aggregate guide covers all the available aggregate functions and configuration options.