DAX fundamentals — Excel Course
Measures, CALCULATE, FILTER, DIVIDE and DISTINCTCOUNT. Learn it step by step with guided practice on Excelquro.
Understand
A measure is evaluated in the current filter context. Total Sales can be the same measure across All Branches, Mumbai or Pune because the filter context changes the rows being aggregated. Calculated columns are stored row-by-row; measures are evaluated when the report asks for them.
Worked example
The measure is not hardcoded to Mumbai or Pune. The report filter supplies the context in which SUM is evaluated.
Total Sales := SUM(Sales[Amount])
Follow along
- Distinguish a stored row calculation from a measure.
- Create Total Sales.
- Create Average Sales.
- Create Distinct Customers with DISTINCTCOUNT.
- Use DIVIDE for safe ratios.
- Use CALCULATE to modify filter context and test the measure by Branch.
- Compare the result under All Branches and individual branches.
Interactive practice runs in your browser.