Group and total turns row-level data into a summary. Instead of one row per order line, you get one row per group, such as each month and SKU, with totals like net sales and units.
Turn on grouping
Under Group and total, turn the switch on. It reads On: grouped rows, and Merchant Sheets fills in suggested groups and totals for the data type. For Order lines, that's Order date by month and SKU, with totals for net sales, units, and gross profit.
Turning grouping on hides Fields, because a grouped table's columns come from your groups and totals.
Choose your groups
Under Group by, choose a field, such as SKU or Sales channel.
For a date field, choose how to bucket it: Day, Week, Month, Quarter, or Year.
Select Add group to group by another field. You can use up to 5 groups.
Choose your totals
Under Totals, choose a function, then the field it applies to.
Optional: Rename the total in the box next to it. The name becomes the column header.
Select Add total for another. You can use up to 20 totals.
Total functions
Function | What it returns |
Sum | The sum of the field, such as total net sales |
Count | How many rows. Choose Rows as the field to count rows in each group. |
Count distinct | How many different values, such as distinct orders or customers |
Average | The average of the field |
Min | The smallest value |
Max | The largest value |
Each field offers only the functions that make sense for it. A price, for example, offers Average, Min, and Max, but not Sum.
What the grouped table looks like
Group columns come first, then totals, with one row for each combination of groups. A date bucket shows the first day of each period, so October 2026 appears as 2026-10-01, under a header like Order date (month). Tables grouped by a date sort newest first unless you choose another sort.
Order date (month) | SKU | Net sales | Units | Gross profit |
2026-10-01 | TEE-BLK-M | 4,280.00 | 172 | 2,140.00 |
2026-10-01 | TEE-WHT-M | 3,115.50 | 124 | 1,498.25 |
2026-09-01 | TEE-BLK-M | 5,902.00 | 236 | 2,951.00 |
Filters and grouping
Filters apply before grouping. To get net sales by SKU for last month, filter Order date to Last month, then group by SKU.
If there are too many groups
A grouped query can return up to 10,000 groups. Past that, the pane says how many groups your query produced. Narrow your filters, remove a group, or use a coarser date bucket, such as Month instead of Day.