DAX (Data Analysis Expressions) is the formula language you use to build calculations in Power BI, Power Pivot for Excel and SQL Server Analysis Services Tabular models. It defines measures such as margin, year-over-year growth or a running total. The main condition that changes the answer: if your report only needs sums, counts and averages of columns that already exist, you can drag fields into a visual and never write DAX. The moment you need a ratio, a time comparison or a number that must react to what the viewer selects, DAX is how you get it.
This guide covers what DAX is, the three places you write it, how it differs from SQL, and what happens to your DAX-driven numbers once they have to leave the model and reach other people on a schedule.
Table of Contents
- A running example: the weekly branch margin report
- What DAX is, in plain terms
- Why a simple sum is not enough
- Measures, calculated columns and calculated tables
- Filter context: the idea that makes DAX click
- DAX compared with SQL
- Where you can use DAX
- A sensible way to learn it
- From a correct measure to a delivered report
- Our point of view
- Put your DAX measures on a schedule
- FAQ
A running example: the weekly branch margin report
The examples below follow one illustrative scenario, not a real customer. A retail company has 40 branches. Every Monday at 7 a.m., each branch manager needs a one-page report showing last week's revenue, gross margin percentage and how both compare with the same week last year. The finance director needs a consolidated version by 8 a.m. The reason it matters: managers set staffing and discounting for the week from these numbers.
The data model holds a Sales table with Revenue, Cost, Quantity and a date for every transaction line. Nothing in that table says "margin percentage" or "same week last year". Those are calculations, and DAX is where you define them.
What DAX is, in plain terms
DAX is a formula language. It looks like Excel formulas, but it works on whole columns and tables instead of individual cells. A W3Schools introduction to DAX in Power BI puts that difference at the center: Excel formulas work on cells, DAX works on columns and tables.
It is usually described as a formula language that doubles as a query language. You can write formulas that define calculations in a model, and you can write queries that return rows and columns from it. Wikipedia's DAX entry lists the places formulas can live: calculated columns, measures, calculated tables, calculation groups, custom format strings and role-based security filters in Tabular models. It also notes that the same Analysis Services engine runs Tabular models in Power BI and Power Pivot for Excel, which is why DAX skills carry across those tools.
You also use DAX every time you open a report without knowing it. As Elegant BI explains, each visual on a report page triggers a DAX query that fetches exactly the data that visual needs.
Why a simple sum is not enough
Dragging Revenue into a chart gives you a sum. That is fine for a total. It stops working when the business question needs more than one column or a different slice of time.
DataCamp's Power BI DAX tutorial draws the line this way: use DAX when you want to reuse one formula across many charts, so you change it once instead of many times, or when a plain SUM or AVERAGE cannot answer the question. IWIS's 2026 DAX guide names three typical reasons analysts reach for it:
- Business metrics such as margin, conversion and lifetime value that cannot be had by summing a column.
- Time intelligence: year-over-year comparisons, running totals, opening and closing values.
- Dynamic calculations that recalculate for whatever filters the user selects, instead of storing a result for every row.
For the branch report, that translates into three formulas:
Total Revenue = SUM ( Sales[Revenue] )
Gross Margin % =
DIVIDE ( SUM ( Sales[Revenue] ) - SUM ( Sales[Cost] ), SUM ( Sales[Revenue] ) )
Revenue Last Year =
CALCULATE ( [Total Revenue], SAMEPERIODLASTYEAR ( 'Date'[Date] ) )
The second formula matters most. Margin percentage is a ratio of sums. If you computed it per row and then averaged it, a branch with one tiny, high-margin sale would distort the result. A measure divides the totals after filtering, so the answer is right whether the viewer looks at one branch, one region or the whole company.
When your existing tools are enough
You do not need DAX if the report shows totals, counts or averages of fields that already exist and nobody asks for ratios or period comparisons. A simple operations summary of tickets closed per team often fits that description. You need DAX when someone asks "compared to what?" or "as a percentage of what?". If the answer to either requires logic beyond one column, write a measure.
Measures, calculated columns and calculated tables
In Power BI Desktop you write DAX in three places, and picking the wrong one is the most common beginner mistake.
| Where you write it | What it produces | When it is calculated | Best for |
|---|---|---|---|
| Measure | One value that reacts to the current filters | At the moment a visual is drawn | Totals, ratios, year-over-year, anything the viewer slices |
| Calculated column | A new value on every row of a table | During data refresh, then stored in the model | Row-level values you need in slicers, rows or columns of a visual |
| Calculated table | A whole new table | During data refresh | Date tables, helper tables, snapshots |
The distinction comes from SQLBI's article on calculated columns and measures. A measure is evaluated in the context of the cell in a report or query and works on aggregations defined by the current filter context. A calculated column is computed at the row level during processing and stored in memory. SQLBI's Marco Russo recommends measures wherever possible because they do not consume memory the way stored columns do.
In the branch example, a column such as Line Revenue = Sales[Price] * Sales[Quantity] belongs on the row, because it is computed from values in the same row. Gross Margin % belongs in a measure, because it must respond to the branch filter. If you want a deeper walk-through of the three types, see our post on the difference between calculated columns, calculated tables and measures.
Filter context: the idea that makes DAX click
Most DAX confusion comes from one concept, filter context. It means the set of filters that apply to a calculation at the moment it runs: the branch selected in a slicer, the week on the axis, the product category in a row. Your measure is written once, and the engine evaluates it again for every cell of the visual under that cell's filters.

Xomnia describes the effect with a memorable line: DAX calculations are dynamic and can "slice the cake while it's still in the oven", which is part of why Microsoft built a new language instead of reusing SQL. You can read the full comparison in Xomnia's piece on DAX measures for SQL users.
For our report, that means one Gross Margin % measure serves 40 branch pages, a regional rollup and the finance director's total. You do not write 42 formulas.
CALCULATE is the function you will use most to change that context. In Revenue Last Year above, it takes the normal revenue total and re-evaluates it with the date filter shifted back a year. Our post on variables in DAX shows how to keep longer formulas readable once you start stacking these.
DAX compared with SQL
If you come from a database background, expect a few surprises. Frank Banin's DAX for SQL folks on SQLServerCentral explains that SQL is declarative: you describe the result with SELECT and JOIN. DAX is functional: every expression is a function call. The article also maps EVALUATE in DAX to SELECT ... FROM in T-SQL for returning rows and columns from a table.
The differences that affect daily work:
- Joins. In DAX you rarely write them. Elegant BI notes that relationships already defined in the model handle joins.
- Grouping. SQL uses GROUP BY. In a DAX query, SUMMARIZECOLUMNS plays the role of SELECT, and WHERE-clause conditions become filters.
- Evaluation. SQL queries run against stored rows in a database. DAX runs against a model and depends on row and filter context.
- Writes. DAX defines calculations and returns data. It is not how you insert or update source records.
Which is harder depends on your background. SQL users tend to stumble on filter context. Excel users tend to stumble on thinking in columns rather than cells. Both groups get comfortable once they build a few measures of their own.
Where you can use DAX
Power BI is the most common home, and the same language works in Power Pivot for Excel and in Analysis Services Tabular models, as the Wikipedia entry above notes. That gives a useful side effect: a measure you prototype in one environment is usually transferable to another.
Analysts who learn to read DAX queries also gain a debugging tool. Elegant BI's Michael Kovalsky argues that reading and writing DAX as a query language helps when evaluating a model's performance and testing a new measure before it goes into the model.
Measures also feed KPI work. If you are choosing which numbers deserve a measure in the first place, order processing KPIs show how metrics built on time and ratios give operations teams more than a raw total ever could.
A sensible way to learn it
- Start with measures, not columns. Write SUM, COUNT and DIVIDE measures first. They cover most beginner needs.
- Build a proper date table. Time intelligence functions such as SAMEPERIODLASTYEAR need a continuous date table related to your fact table. Our post on data modeling best practices covers how model design affects every formula you write.
- Learn CALCULATE next. It changes filter context, and most advanced patterns are built on it.
- Use variables. They make formulas easier to read and debug.
- Move on to iterators and calculation groups once the basics are routine. Our posts on complex measures for power users and advanced DAX patterns and calculation groups pick up from here.
The measure itself is only half the job. In our branch example, the formulas are done once the model is published. What remains is getting 40 different versions of the report to 40 different inboxes every Monday morning.
From a correct measure to a delivered report
DAX decides what the numbers say. It does not decide who receives which version, in what file format, at what time. Teams often discover this after the model is finished: a dozen people ask for the report, someone exports PDFs by hand each Monday, and the manual routine becomes the weakest link in an otherwise well-built solution.
For the branch report, the delivery requirements are concrete:
- Each of the 40 managers receives only their branch's pages.
- The finance director receives the consolidated report as an Excel file and a PDF.
- Everything arrives before 8 a.m. on Monday without anyone clicking Export.
That is the job PBRS covers for Power BI and SSRS reporting. It automates scheduling, export and distribution, including paginated reports, and it can generate recipient-specific versions through report bursting, which means producing one tailored output per recipient from a single report. It can also run reports on a schedule or when an event occurs, and deliver to internal or external recipients. The measures you wrote stay in your model; PBRS handles the Monday-morning routine around them. Our walkthrough on automatically distributing Power BI reports and dashboards shows the process in detail.
Our point of view
We see DAX as the part of a reporting project that earns trust, and delivery as the part that keeps it. A measure that calculates margin correctly means nothing if the branch manager opens last Friday's PDF because someone forgot to export the new one.
That is why we build PBRS, ATRS and CRD around control: when a report runs, what each recipient sees, and where each file goes. For Power BI and SSRS teams, that means the measures your analysts took care to write reach the right people in the right format, on a schedule or when an event happens, without a person in the middle.
For teams that want dashboards, KPIs and report access in one place on their own infrastructure, IntelliFront BI is our self-hosted portal. Your reporting data stays where you host it.
Our advice: learn DAX well enough to get the numbers right, then decide early how those numbers will be delivered. Teams that plan both together spend far less time on repetitive exports later.
Christian Ofori-Boateng
Put your DAX measures on a schedule
If your Power BI or SSRS reports already show the right numbers, the next question is how they reach the people who need them. PBRS for Power BI and SSRS automates the scheduling, export and distribution of those reports, including per-recipient versions through report bursting.

See how PBRS for Power BI and SSRS fits your reporting workflow, or read about flexible scheduling of Power BI report exports first. Tableau Cloud teams can look at ATRS, and Crystal Reports teams at CRD, which do the same job for those platforms.
FAQ
Why do we use DAX?
We use DAX to define calculations that a simple sum or average cannot produce, such as margin percentages, year-over-year comparisons and running totals. A DAX measure is written once and recalculates for whatever filters the viewer applies. That lets one formula serve every chart and every page in a report.
Which is harder, DAX or SQL?
Neither is harder in general, but they test different habits. SQL is declarative and works on rows in a database. DAX is functional and depends on filter context, which is the idea most learners need time to absorb. People who already know Excel formulas often pick up basic DAX faster than SQL joins.
Can DAX be used in Excel?
Yes. DAX works in Power Pivot for Excel, which runs on the same Analysis Services engine as Power BI Tabular models, according to Wikipedia's DAX overview. Ordinary worksheet formulas are a separate thing: they work on cells, while DAX works on columns and tables.
Do I have to write DAX to build a Power BI report?
Not always. If a visual only needs sums, counts or averages of existing columns, you can build it by dragging fields. You need DAX once you want ratios, time comparisons or one formula reused across many visuals. Start with a few measures and add more as questions come up.
