0
0
Power BIbi_tool~10 mins

Filter context concept in Power BI - Cell-by-Cell Formula Trace

Choose your learning style9 modes available
Sample Data

Sales data for products with their categories and sales amounts.

CellValue
A1Product
B1Category
C1Sales
A2Apple
B2Fruit
C2100
A3Banana
B3Fruit
C3150
A4Carrot
B4Vegetable
C4200
A5Broccoli
B5Vegetable
C5120
Formula Trace
CALCULATE(SUM(Sales[Sales]), Sales[Category] = "Fruit")
Step 1: Sales[Category] = "Fruit"
Step 2: SUM(Sales[Sales]) over filtered rows
Step 3: CALCULATE(...) returns sum with filter applied
Cell Reference Map
    A        B          C
1 Product  Category   Sales
2 Apple    Fruit      100
3 Banana   Fruit      150
4 Carrot   Vegetable  200
5 Broccoli Vegetable  120

Filter applied on column B (Category) for 'Fruit' rows (A2,B2,C2 and A3,B3,C3).
The formula filters rows where Category equals 'Fruit' and sums the Sales column for those rows.
Result
    D
1 Filtered Sales
2 250

Cell D2 shows the total sales for products in the 'Fruit' category.
The result 250 is the sum of sales for Apple and Banana, the filtered products.
Sheet Trace Quiz - 3 Questions
Test your understanding
What does the filter context do in this formula?
ASelects only rows where Category is 'Fruit'.
BSums all sales without filtering.
CFilters sales greater than 200.
DChanges product names to uppercase.
Key Result
CALCULATE applies filter context to modify which rows are included before aggregation.