📊Data Analysis Expressions (DAX)
Also known as DAX, DAX Formula, DAX Measure
The way to write sums and counts in Power BI.
Think of it like
It is like the sums you type in a sheet. But it works on a whole set of tables at once.
Example
A report shows sales and sales last year side by side. When the reader picks one store, both numbers change to that store.
Why it matters
A measure is written once and works under each filter. No one has to build the number again for each chart.
Definition
Example code
dax
Total Sales = SUM ( Sales[Amount] )
Sales Last Year =
CALCULATE ( [Total Sales], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )Common mistake
Key takeaways
- 1Excel-like. Familiar shape, works on tables.
- 2Measures. Worked out when the chart is drawn.
- 3Filter aware. Right for each region or month.