0
0
Power BIbi_tool~10 mins

CALCULATE function introduction in Power BI - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

This table shows sales amounts for different products and their regions.

CellValue
A1Product
A2Apple
A3Banana
A4Cherry
B1Sales
B2100
B3150
B4200
C1Region
C2North
C3South
C4North
Formula Trace
TotalSalesNorth = CALCULATE(SUM(Sales), Region = "North")
Step 1: SUM(Sales)
Step 2: Region = "North" filter applied
Step 3: SUM(Sales) with filter Region = "North"
Step 4: CALCULATE(SUM(Sales), Region = "North")
Cell Reference Map
    A       B       C
1 Product  Sales  Region
2 Apple     100    North
3 Banana    150    South
4 Cherry    200    North

Formula uses Sales (B2:B4) and Region (C2:C4) columns.
The formula uses the Sales column for summing and filters rows based on the Region column.
Result
    A               B       C
1 Product      Sales  Region
2 Apple         100    North
3 Banana        150    South
4 Cherry        200    North
5
6 TotalSalesNorth: 300
The result of the CALCULATE formula is 300, which is the sum of sales for products in the North region.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the CALCULATE function do in this formula?
AIt multiplies sales by region
BIt sums all sales without any filter
CIt changes the filter context to only include North region
DIt counts the number of products
Key Result
CALCULATE(expression, filter) changes filter context before evaluating expression