Power BI 6 min

What is DAX in Power BI?

Short answer

DAX (Data Analysis Expressions) is the formula language used in Power BI, Excel Power Pivot, and Analysis Services to create calculations on top of a data model. It powers measures (dynamic calculations that respond to filters and slicers) and calculated columns (static values computed row by row). DAX functions resemble Excel formulas but operate across entire tables and relationships rather than single cells.

DAX (Data Analysis Expressions) is the formula language behind Power BI, used to build calculated columns, measures, and custom aggregations in a semantic model.

Why Power BI needs a formula language

Loading data into Power BI is only half the work; most reports also require calculations that go beyond what raw columns provide, such as year-over-year growth, running totals, or profit margins that combine several tables. DAX is the language that makes those calculations possible. It was designed specifically for analytical work on top of a data model with relationships, rather than for calculating individual spreadsheet cells, which is why it behaves differently from Excel formulas even though the syntax looks familiar.

DAX functions operate on tables and columns as a whole. A function like SUM(Sales[Amount]) adds up an entire column, and the result changes depending on which rows are currently visible in the report, based on slicers, filters, and the layout of a visual. This dynamic behavior is what makes a single DAX measure reusable across dozens of different charts and tables without rewriting the formula each time.

Measures versus calculated columns

DAX calculations come in two main forms. Measures are computed at query time and respond to the filter context of whatever visual displays them; a “Total Sales” measure shows a different number depending on whether you are looking at one region or the whole company, without any extra formula work. Calculated columns, by contrast, compute a fixed value for every row when the data refreshes and store that value in the model. They are useful for creating static groupings, such as labeling customers as “New” or “Returning” based on their first purchase date, something you want to filter or slice by rather than aggregate dynamically. Because calculated columns increase model size and measures do not, most experienced Power BI builders default to measures unless a static, row-level value is genuinely needed.

Understanding filter context

The concept that trips up most people new to DAX is filter context: the set of filters currently applied to a calculation, coming from slicers, visual-level filters, row and column headers in a table, and other measures. A measure like Total Sales does not have one fixed value; it recalculates for every cell of a matrix or every bar in a chart based on what filters apply at that point. Getting comfortable with filter context is the single biggest step toward writing correct, predictable DAX formulas. Because it depends heavily on how the underlying semantic model is structured, relationships between tables directly influence how DAX calculations behave.

The CALCULATE function

Nearly every advanced DAX pattern eventually uses CALCULATE, the function that can modify filter context directly. It allows you to write formulas such as “total sales ignoring the product filter” or “sales from the same month last year,” patterns that are impossible to express with basic aggregation functions alone. Time intelligence functions in DAX, such as SAMEPERIODLASTYEAR or DATESYTD, are built on top of CALCULATE internally.

Getting started with DAX

Rather than trying to learn the full language at once, most people build DAX skills by solving specific reporting problems as they come up: a total, then a percentage of total, then a year-over-year comparison. Data cleaned and shaped in Power Query sets up the tables that DAX then calculates over, so a well-structured data model makes DAX formulas considerably simpler to write.

Our tip: Before writing a complex DAX measure, sketch out in plain language what filter context you expect at each step. Most DAX bugs come from an incorrect assumption about which filters are active, not from a syntax mistake.

Frequently asked questions

Is DAX the same as Excel formulas?

DAX shares some syntax and function names with Excel, such as SUM or IF, which makes it approachable for Excel users. The key difference is context: an Excel formula calculates a single cell, while a DAX measure calculates a result that changes depending on filters applied by the report, such as a selected date range or product category. This concept, called filter context, has no direct equivalent in Excel and is the main learning curve when moving from Excel to DAX.

What is the difference between a measure and a calculated column in DAX?

A measure is calculated on the fly, at query time, based on the current filter context of the report; it does not store a value in the table and adapts automatically as users interact with slicers and visuals. A calculated column is computed once, row by row, when the data is refreshed, and its result is stored physically in the model, increasing its size. Measures are generally preferred for aggregations like totals and ratios, while calculated columns are used when you need a static value to filter, group, or sort by, such as categorizing values into buckets.

Do I need to learn DAX to use Power BI?

For basic reporting, Power BI can generate simple sums, counts, and averages automatically without any DAX. Once you need custom logic, such as year-over-year growth, running totals, or ratios that depend on specific business rules, DAX becomes necessary. Most Power BI users pick up a working set of DAX functions gradually, learning through specific reporting needs rather than studying the full language upfront.

What is the CALCULATE function in DAX and why is it important?

CALCULATE is the most important function in DAX because it is the only one that can change the filter context of a calculation. It lets you override existing filters, for example to calculate a total ignoring a selected date range, or to compare current sales against the same period last year. Most advanced DAX patterns, including time intelligence and comparative calculations, rely on CALCULATE. Read more in our article on the CALCULATE function in Power BI.

Want a dashboard or automation built for you?

Stuurboard BI builds custom Power BI dashboards and workflow automations. Pragmatic, fast, and without the fuss.