0
0
Google Sheetsspreadsheet~10 mins

Creating a PivotTable in Google Sheets - Formula Evaluation Walkthrough

Choose your learning style9 modes available
Sample Data

Sales data showing products, regions, and sales amounts.

CellValue
A1Product
B1Region
C1Sales
A2Apples
B2North
C2100
A3Apples
B3South
C3150
A4Oranges
B4North
C4200
A5Oranges
B5South
C5120
Formula Trace
QUERY(A1:C5, "select A, sum(C) group by A", 1)
Step 1: QUERY(A1:C5, "select A, sum(C) group by A", 1)
Cell Reference Map
    A       B       C
1 |Product| Region | Sales |
2 |Apples | North  | 100   |
3 |Apples | South  | 150   |
4 |Oranges| North  | 200   |
5 |Oranges| South  | 120   |
The formula references the range A1:C5 which contains product names, regions, and sales values.
Result
    E       F
1 |Product| sum   |
2 |Apples | 250   |
3 |Oranges| 320   |
The pivot-like result shows total sales summed by product.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the QUERY function do in this formula?
AFilters sales data by region
BGroups sales by product and sums sales amounts
CSorts products alphabetically
DCalculates average sales per region
Key Result
QUERY(range, "select column, sum(column) group by column", header_rows) groups data and sums values by a category column.