CALCULATE is the most important function in DAX. It evaluates an expression with a different set of filters, which is how you get “sales for the North region” or “sales last year” from one measure.
The basic form
CALCULATE(expression, filter1, filter2 …)
Example
Total Sales for North could be CALCULATE(SUM(Sales[Amount]), Regions[Name] = “North”). The same measure, used in a table with a region column, now shows each region correctly.
Understand filter context first
Each visual in Power BI starts with filters from the slicers, rows and columns. CALCULATE adds to or changes those filters. If a result looks wrong, check which filters are active on that visual.
Build on Power BI date tables and row-level security, both of which rely on the same filter ideas. Book a free demo class, and ask a counsellor for the course schedule.
