0
0
Tableaubi_tool~10 mins

Aggregate vs row-level calculations in Tableau - Formula Comparison Trace

Choose your learning style9 modes available
Sample Data

This data shows sales orders with order ID, product name, quantity sold, and price per unit.

CellValue
A1Order ID
B1Product
C1Quantity
D1Price
A21001
B2Pen
C210
D21.5
A31002
B3Notebook
C35
D33.0
A41003
B4Pen
C47
D41.5
A51004
B5Pencil
C520
D50.5
Formula Trace
SUM([Quantity] * [Price])
Step 1: [Quantity] * [Price] for each row
Step 2: SUM of all row results
Cell Reference Map
     A       B         C       D
1 | Order ID | Product | Quantity | Price
2 | 1001    | Pen     | 10       | 1.5
3 | 1002    | Notebook| 5        | 3.0
4 | 1003    | Pen     | 7        | 1.5
5 | 1004    | Pencil  | 20       | 0.5

Arrows: Quantity and Price columns feed into the calculation for each row.
The formula uses Quantity (column C) and Price (column D) from each row to calculate row-level sales, then sums all rows.
Result
     A       B         C       D       E
1 | Order ID | Product | Quantity | Price | Total Sales
2 | 1001    | Pen     | 10       | 1.5   | 15
3 | 1002    | Notebook| 5        | 3.0   | 15
4 | 1003    | Pen     | 7        | 1.5   | 10.5
5 | 1004    | Pencil  | 20       | 0.5   | 10

Summary Total Sales: 50.5
Each row shows total sales (Quantity * Price). The final total sales is the sum of all rows: 50.5.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the expression [Quantity] * [Price] calculate in the formula?
AThe average price of products
BThe total sales for each individual order
CThe sum of all quantities
DThe total number of products sold
Key Result
Multiply row-level fields first, then aggregate the results with SUM.