DAX
The formula language of semantic models, used to write the measures every report shows.
DAX looks like Excel formulas, which is why people underestimate it. It works on whole tables and filters, not cells, and most slow or wrong numbers in Power BI start with that misunderstanding.
Part of the Model layer of the ecosystem. Reviewed 13 November 2026 by Piyush Jain.
What DAX is
DAX (Data Analysis Expressions) is the language for measures, calculated columns and calculated tables in a semantic model. A measure is a formula that is evaluated for each cell of a visual, under the filters that cell sits in: the year on the row, the region on the slicer, and so on. That set of filters is the filter context.
Two engines run a query. The storage engine scans compressed data quickly and in parallel. The formula engine handles the logic that the storage engine cannot, on a single thread. Fast DAX pushes as much work as possible to the storage engine.
When to use it
Use it when
- Use measures for anything that is summed, counted or compared in a report.
- Use calculated columns only for values you need to filter or group by, and that cannot be built upstream.
Think twice when
- Avoid DAX for data cleaning. Fix data in Power Query or the source, where it runs once, not on every query.
The mistakes I see most
From opening other people's models. Each one is fixable.
- 1
FILTER over a whole table inside CALCULATE
CALCULATE ( [Sales], FILTER ( Sales, Sales[Region] = "West" ) ) iterates the whole fact table. A plain column filter, Sales[Region] = "West", does the same job and lets the storage engine do it.
- 2
Iterators with context transition on big tables
SUMX over a large table that calls another measure triggers context transition on every row. It is the most common cause of a visual that takes ten seconds or more.
- 3
The same measure, defined three ways
When every report author writes their own Net Sales, the numbers drift apart. Define it once in the shared model, with a description, and reuse it.
Questions people ask
- What is the difference between a measure and a calculated column?
- A calculated column is computed once per row at refresh and stored in the model, so it uses memory. A measure is computed at query time for each cell of a visual and stores nothing. Use measures for numbers you aggregate.
- What is filter context in DAX?
- The set of filters that applies when a measure is evaluated: from rows and columns of the visual, slicers, page and report filters, and CALCULATE. The same measure returns different values because the filter context differs.
- How do I find out why a DAX measure is slow?
- Run the visual's query in DAX Studio with server timings on. If most of the time is in the formula engine, the measure needs rewriting; if it is in the storage engine, look at the model and the data size.
Sources: Microsoft Learn: DAX overview; Microsoft Learn: Performance Analyzer. Opinions are my own.