What Is DAX?
DAX (Data Analysis Expressions) is the formula language used throughout Power BI to build calculations. If you've used Excel formulas, the syntax will feel familiar — but DAX works across entire tables and relationships, not just individual cells.
Measures vs Calculated Columns
This trips up almost every beginner, so it's worth getting straight early:
| Measure | Calculated Column | |
|---|---|---|
| Calculated | On the fly, when used in a visual | Once, when data refreshes |
| Result | A single value (like a total) | A new column of values, one per row |
| Use for | Totals, ratios, KPIs | Categorizing or flagging rows |
Rule of thumb: if you want a single summarized number (Total Sales, Average Order Value), use a measure. If you need a new attribute on every row (like a Price Tier), use a calculated column.
Core Functions
These handful of functions cover the vast majority of real business questions:
Total Sales = SUM(Sales[Amount])
Order Count = COUNT(Sales[OrderID])
Unique Customers = DISTINCTCOUNT(Sales[CustomerID])
Average Order Value = AVERAGE(Sales[Amount])
High Value Orders =
CALCULATE(
COUNT(Sales[OrderID]),
Sales[Amount] > 1000
)Understanding CALCULATE
CALCULATE is the most important function in DAX — it lets you change the filter context of a calculation. In plain terms: it lets you say "calculate this, but only for these specific conditions."
Sales This Year =
CALCULATE(
SUM(Sales[Amount]),
YEAR(Sales[Date]) = YEAR(TODAY())
)Almost every advanced DAX pattern you'll eventually learn — year-over-year growth, running totals, percent of total — is built on top of CALCULATE.
Practice Tips
- Start by rebuilding simple Excel formulas you already understand as DAX measures
- Always test a measure against a number you can verify by hand on a small dataset
- Don't try to memorize every function — learn to look things up and understand the pattern instead