Filter context is the single most important DAX concept. A measure doesn't compute one fixed number — it recomputes for the filters applied by each cell of a visual (the row, the slicer, the page filter). CALCULATE is how you change that context.
What is filter context?
Total Sales = SUM(Sales[Amount]) shows the grand total on a card, but per product in a bar chart, and this month under a slicer — same measure, different results, because the surrounding filters differ. That's filter context, applied automatically.
CALCULATE
Sales (Data prog) =CALCULATE([Total Sales], Products[Programme] = "Data")% of Total =DIVIDE([Total Sales], CALCULATE([Total Sales], ALL(Products)))-- ALL() removes filters, giving the grand total for the ratio
Key takeaways
- 01Filter context: a measure recomputes for the filters applied by each visual cell/slicer/page.
- 02The same measure gives different results per row, column and slicer — automatically.
- 03CALCULATE(expression, filters) evaluates a measure with a modified filter context.
- 04ALL removes filters (e.g. for % of total); mastering context is the key DAX skill.
