Book a call →
Data

What is Data Analysis Expressions?DAX

DAX (Data Analysis Expressions) is the formula language used in Power BI, Power Pivot, and Analysis Services to define measures, calculated columns, and calculated tables on top of a semantic model.

DAX looks like Excel formulas at first glance, but the mental model is different. Excel calculates row by row. DAX operates on the filter context propagated through a semantic model — every measure result depends on which rows the user has filtered, sliced, or drilled into. Most DAX bugs are filter-context bugs. Mastering DAX means mastering CALCULATE, FILTER, ALL, RELATED, and the time-intelligence family — and knowing when a calculation belongs in a measure versus a calculated column versus the upstream model.

What it includes

  • Measures — runtime calculations that respect filter context
  • Calculated columns — row-level calculations stored in the model
  • Calculated tables — derived tables for bridging or virtualising
  • Time-intelligence functions (DATESYTD, SAMEPERIODLASTYEAR, DATEADD)
  • Filter functions (CALCULATE, FILTER, ALL, ALLEXCEPT, REMOVEFILTERS)
  • Iterators (SUMX, AVERAGEX, RANKX) for row-context calculations

How it works

  1. Start with a measure, not a column

    Default to measures. Calculated columns inflate the model size and run at refresh time; measures run at query time on filtered subsets and stay flexible.

  2. Use variables for readability

    VAR / RETURN blocks make DAX readable and faster (single evaluation). A measure longer than five lines without VARs is a code review fail.

  3. Format with DAX Studio

    DAX Studio for performance profiling, formatting, and query plans. Every non-trivial measure gets a query plan check before shipping.

  4. Wrap with CALCULATE

    Most non-trivial measures wrap CALCULATE around a base aggregation with one or more filter arguments. Learn this pattern; everything else builds on it.

  5. Test against a known answer

    Build the measure against a tiny dataset where the answer is obvious. Confirm. Then scale up.

Frequently asked

DAX vs SQL — which should I learn?

Both, for different jobs. SQL for shaping data inside the warehouse. DAX for business logic on top of the semantic model in Power BI. They are complements, not substitutes.

Why is my DAX measure slow?

Most often: row-context iteration over a large table (SUMX over millions of rows), or unintended cross-filter direction. DAX Studio query plans tell you which.

Calculated column or measure?

Measure unless you have a specific reason. Calculated columns when the value is referenced in slicers, axes, or many other measures and recomputing at query time is expensive.

Last reviewed: May 11, 2026Category: Data← All terms

Put this into practice.

Definitions are a starting point. If you want to operationalise Data Analysis Expressions in your stack, we’re the team that ships it.

We respond within 24 hours. No spam, no generic pitches.