DAX in Power BI: the language of measures, explained for Excel users

Published · Updated · 15 min read

Dylan Arnaud, founder of Datafuji

DAX (Data Analysis Expressions) is the formula language of Power BI and of Power Pivot in Excel: you use it to write measures, which are recalculated in every cell of a report according to its filters. A badly written measure gives no warning: it shows a 28.2% margin when the accounts say 24.3%. This article gives the six measures of a quarterly review, each with its code, its result and a pitfall with the wrong number it produces.

What is DAX in Power BI?

DAX is, in Microsoft’s words, “a formula expression language used in Analysis Services, Power BI, and Power Pivot in Excel.” Its functions calculate over the tables of a data model, never over cells.

You write it in four places in the model, which Microsoft now calls a semantic model: measures, calculated columns, calculated tables and row-level security rules. In business reporting, measures do most of the work.

The formulas look like Excel’s, but three differences explain almost every surprise:

  • No more cells. You refer to a whole column, Sales[Amount]: the table, then the column in square brackets.
  • The result depends on where it sits. The same measure shows the quarter’s total in a card (a visual that displays a single number) and February’s total on the “February” row. That is context, the central idea of the language.
  • Familiar names, but watch the separators. SUM and IF keep their Excel names. Microsoft separates arguments with a comma; with some regional settings (French, for example), certain editors expect a semicolon.

DAX calculates; it does not prepare data, and a formula never changes a value in a table. Removing a total row or combining twelve exports happens before, in Power Query, with another language, M.

The worked example: a distribution SME and its four tables

All the figures that follow come from a small model you can copy: a fictional distributor, reduced to four tables. It is March 31, 2026, and management wants its quarterly review.

The Sales table has 17 invoice lines, in euros excluding VAT:

DateProduct CodeQuantityAmountUnit Cost
01/09/2025P-18204,000130
01/21/2025C-5020012,00051
02/06/2025V-12759,00084
02/18/2025C-5020012,00051
03/05/2025P-18408,000130
03/20/2025C-5025015,00051
04/10/2025V-1210012,00084
01/08/2026P-18204,000130
01/15/2026C-5020012,00051
01/27/2026B-10402,00030
02/05/2026V-12506,00084
02/12/2026P-18255,000130
02/24/2026C-501509,00051
03/04/2026P-18408,000130
03/11/2026B-10603,00030
03/19/2026V-12505,40084
03/26/2026C-501609,60051

The amount comes from the invoice: the one dated 03/19/2026 includes a discount.

Products puts the P-18 drill and the V-12 driver in Tools, the C-50 cable in Electrical and the B-10 paint in Paint. Budget sets €20,000 for January 2026, €19,000 for February and €24,000 for March. Dates has one row per day across 2025 and 2026: 730 rows.

The diagram shows what connects the tables, and what does not.

Star schema with four tables. Sales and Budget, the fact tables, sit in the middle; Products and Dates, the dimensions, around them. Three one-to-many relationships: Products to Sales on the product code, Dates to Sales and Dates to Budget on the date. No relationship between Products and Budget: the Category filter reaches sales, not the budget.Star schema with four tables. Sales and Budget, the fact tables, sit in the middle; Products and Dates, the dimensions, around them. Three one-to-many relationships: Products to Sales on the product code, Dates to Sales and Dates to Budget on the date. No relationship between Products and Budget: the Category filter reaches sales, not the budget.
A filter only travels through a relationship: the category reaches sales, not the budget.

The missing link between Products and Budget is deliberate: this budget is set per month, for all categories combined, and measure 4 will show the consequence. It is a small star schema.

Unless stated otherwise, the report is filtered to January through March 2026; the Enter data button in Power BI Desktop lets you paste these tables. Results were recalculated by script and the functions checked against Microsoft’s reference: the model has not yet been run in Power BI Desktop.

How do you create a DAX measure, and when is a calculated column better?

You create a measure by right-clicking a table and choosing New measure. Power BI calculates it when it is displayed, cell by cell. Write a measure by default, and a calculated column only to filter or group.

  1. In Power BI Desktop, right-click the Sales table in the Data pane, then select New measure.
  2. In the formula bar, type the name, an equals sign and the formula, then press Enter.
  3. Drag the measure, marked with a calculator icon, into a visual. You can reuse it elsewhere as [Revenue].
Revenue = SUM ( Sales[Amount] )

Quick measures write the formula from a dialog box and leave it visible: according to Microsoft, a good way to learn the syntax.

A calculated column looks like an Excel formula filled down; a measure, as Microsoft puts it, cannot be determined without context.

QuestionCalculated columnMeasure
When is it calculated?At refresh, one value per row.When displayed, one value per cell.
Is it stored?Yes, in the model.No, only the formula is.
Does it react to filters?No.Yes, that is its whole point.
What is it for?Filtering and grouping: a price band, a label.Showing a number: revenue, margin, rate, variance.

Marco Russo and Alberto Ferrari, the reference authors on the language, set the same rule: a measure by default, a calculated column only to filter or group. The classic trap: the margin rate stored in a column and then averaged, 28.2% instead of 24.3% (measure 5).

Why does the same measure show a different number in every cell?

A DAX measure changes value from one cell to the next because each cell has its own filters, its filter context: Power BI keeps the rows that pass them, then applies the formula.

Placed in a matrix, with categories on rows and months on columns, the Revenue measure produces sixteen cells:

CategoryJanuaryFebruaryMarchTotal
Tools4,00011,00013,40028,400
Electrical12,0009,0009,60030,600
Paint2,000blank3,0005,000
Total18,00020,00026,00064,000

The Tools-February cell shows €11,000: two sales pass its filters, at €6,000 and €5,000. The total, €64,000, is recalculated with fewer filters; for a rate, it differs from the sum of the cells, and the total is the one that is right. Paint-February stays empty (BLANK), not zero.

The figure follows one cell, from filter to formula.

Matrix of revenue by category and month, January to March 2026. The Tools-February cell, €11,000, is highlighted in blue. Its filter context: year 2026 and month February, from the Dates table, and category Tools, from the Products table through the relationship. Next to it, the ten sales of 2026: only two pass these filters, 02/05/2026 for the V-12, €6,000, and 02/12/2026 for the P-18, €5,000. SUM ( Sales[Amount] ) returns 6,000 + 5,000 = €11,000. The €64,000 total is recalculated with fewer filters, not added up. Paint-February stays blank.Matrix of revenue by category and month, January to March 2026. The Tools-February cell, €11,000, is highlighted in blue. Its filter context: year 2026 and month February, from the Dates table, and category Tools, from the Products table through the relationship. Next to it, the ten sales of 2026: only two pass these filters, 02/05/2026 for the V-12, €6,000, and 02/12/2026 for the P-18, €5,000. SUM ( Sales[Amount] ) returns 6,000 + 5,000 = €11,000. The €64,000 total is recalculated with fewer filters, not added up. Paint-February stays blank.
One formula, sixteen cells: each one redoes the calculation with its own filters.

Sales has no Category column: the filter reaches it through the relationship, so the data model is part of the calculation, just as in a pivot table.

SUM or SUMX: when do you need to calculate row by row?

SUM adds up a column that exists; SUMX first calculates on each row, then adds up, like SUMPRODUCT. SUMX ( table, expression ) goes through the rows kept by the filters; the current row is called the row context.

Cost of sales, quantity times unit cost, only makes sense row by row:

Cost of Sales =
SUMX (
    Sales,
    Sales[Quantity] *
        Sales[Unit Cost]
)

For the quarter, it comes to €48,460: 14,000 in January, 15,100 in February, 19,360 in March. The classic trap multiplies two totals:

Wrong Cost =
SUM ( Sales[Quantity] ) *
    SUM ( Sales[Unit Cost] )

This measure multiplies 795 units by €771, the sum of the unit costs: €612,945, more than twelve times the real cost. Side by side, the two calculations:

Two calculations of the quarter’s cost of sales. In green, correct: SUMX multiplies quantity by unit cost on each of the ten rows, from 20 × 130 = 2,600 to 160 × 51 = 8,160, then adds them up: €48,460. In orange, wrong: the sum of quantities, 795, multiplied by the sum of unit costs, €771, gives €612,945, a sum of unit prices that means nothing. Two bars on the same scale: the orange bar is nearly 13 times longer than the green one.Two calculations of the quarter’s cost of sales. In green, correct: SUMX multiplies quantity by unit cost on each of the ten rows, from 20 × 130 = 2,600 to 160 × 51 = 8,160, then adds them up: €48,460. In orange, wrong: the sum of quantities, 795, multiplied by the sum of unit costs, €771, gives €612,945, a sum of unit prices that means nothing. Two bars on the same scale: the orange bar is nearly 13 times longer than the green one.
Multiplying row by row gives €48,460; multiplying two totals gives €612,945.

A calculated field in a pivot table falls into the same trap.

What does CALCULATE do in DAX?

CALCULATE “evaluates an expression in a modified filter context,” according to Microsoft: the formula itself adds, replaces or removes a filter. It replaces Excel’s SUMIFS, absolute references and “last year” columns.

Tools Revenue =
CALCULATE (
    [Revenue],
    Products[Category] = "Tools"
)

By month, the category filter is added to the month filter: €4,000 in January, 11,000 in February, 13,400 in March. The three moves come back later:

  • add a filter: revenue for the Tools category only;
  • replace a filter: revenue for the same period a year earlier (measure 2);
  • remove a filter: revenue for all categories, to calculate a share (measure 6).

Two filters separated by a comma combine: both conditions must hold (AND). For one or the other (OR) on the same column, you join them with || in a single filter:

Tools or Paint Revenue =
CALCULATE (
    [Revenue],
    Products[Category] = "Tools" ||
        Products[Category] = "Paint"
)

For the quarter: 28,400 + 5,000 = €33,400. Microsoft sets four rules for a filter written as a condition: columns from a single table, no measures, no nested CALCULATE, no function that scans or returns a table. The one exception: such a function placed inside an aggregation function, such as SUM or MAX.

The trap: CALCULATE replaces the row’s filter

Now put the categories on rows. When the column is already filtered, CALCULATE does not combine its filter: it replaces the row’s filter. To intersect the two, wrap the condition in KEEPFILTERS:

Tools Revenue Kept =
CALCULATE (
    [Revenue],
    KEEPFILTERS (
        Products[Category] =
            "Tools"
    )
)

The table by category shows the difference.

Table by category with three measures. The Revenue column shows €28,400 for Tools, €30,600 for Electrical, €5,000 for Paint, €64,000 in total. The Tools Revenue column, filtered by Products[Category] = "Tools", shows €28,400 on all three rows: on the Electrical and Paint rows this figure is wrong, in orange, because the formula’s filter replaces the row’s filter. The Tools Revenue Kept column, with KEEPFILTERS, intersects both filters: €28,400 for Tools and blank cells for the other two categories, in green.Table by category with three measures. The Revenue column shows €28,400 for Tools, €30,600 for Electrical, €5,000 for Paint, €64,000 in total. The Tools Revenue column, filtered by Products[Category] = "Tools", shows €28,400 on all three rows: on the Electrical and Paint rows this figure is wrong, in orange, because the formula’s filter replaces the row’s filter. The Tools Revenue Kept column, with KEEPFILTERS, intersects both filters: €28,400 for Tools and blank cells for the other two categories, in green.
Without KEEPFILTERS, the Electrical row shows Tools revenue.

It is not a bug: the row and the formula filter the same column, and Microsoft states that the existing filter is replaced. To remove a filter, Microsoft recommends REMOVEFILTERS rather than ALL ( Products ).

Context transition, a notion to keep for later: inside an iterator (a function such as SUMX, which goes through rows one by one), a measure takes the current row as a filter. SUMX ( Products, [Revenue] ) thus calculates revenue product by product, €17,000 for the P-18, then adds them up: €64,000.

Six business measures, from revenue to share of total

Six measures cover the quarterly review: revenue, comparison with the prior year, year-to-date, variance to budget, margin rate and share of total. For each one: the code, the result and the pitfall that skews it, with the wrong number.

1. Revenue

This is the foundation: once [Revenue] is written, the other measures call it. The quarter totals €64,000: 18,000 in January, 20,000 in February, 26,000 in March.

The trap lies in the data, not the formula: if the quarter’s export still contains its “Total” row, SUM adds it to the rest and revenue doubles to €128,000. The row is removed on import, in Power Query.

Before comparing dates: the date table

Time intelligence compares with the prior year or accumulates since January: it needs a complete calendar. Microsoft sets five conditions for it: date data type, unique values, no blank values, no missing days, and whole years, not necessarily calendar years.

A calculated table is enough to create it:

Dates =
ADDCOLUMNS (
    CALENDAR (
        DATE ( 2025, 1, 1 ),
        DATE ( 2026, 12, 31 )
    ),
    "Year", YEAR ( [Date] ),
    "Month No", MONTH ( [Date] ),
    "Month", FORMAT ( [Date], "MMMM" )
)

Three steps remain. Relate it to each fact table (the tables that record dated transactions), here Sales and Budget. Mark it as a date table (right-click the table). Sort the Month column by Month No, otherwise the months sort alphabetically: April first, and February before January.

Microsoft reserves the Auto date/time option, a hidden table for each date column, for simple models; its limits are covered in the star schema guide.

Microsoft now recommends “calendar-based” time intelligence, in preview in November 2026: faster and suited to any calendar, it requires more setup. The measures below stay with the classic approach, which is simpler.

2. Prior-year revenue and growth

SAMEPERIODLASTYEAR takes the dates of the cell and returns the same dates one year earlier; CALCULATE then replaces the date filter. Microsoft gives an equivalent form with DATEADD ( Dates[Date], -1, YEAR ).

Revenue PY =
CALCULATE (
    [Revenue],
    SAMEPERIODLASTYEAR ( Dates[Date] )
)

YoY % =
DIVIDE ( [Revenue] - [Revenue PY], [Revenue PY] )
MonthRevenueRevenue PYYoY %
January18,00016,000+12.5%
February20,00021,000−4.8%
March26,00023,000+13.0%
Total64,00060,000+6.7%

The trap: comparing a year in progress with a full year. With no filter on the months, three months of 2026 face all of 2025: €64,000 against €72,000, or −11.1% instead of +6.7%. Another classic: giving SAMEPERIODLASTYEAR the Sales[Date] column, full of gaps, instead of Dates[Date].

3. Year-to-date

DATESYTD returns every date from January 1 to the last date of the cell; a second argument sets the year-end of a non-calendar fiscal year. TOTALYTD does the same calculation in a single function: TOTALYTD ( [Revenue], Dates[Date] ).

Revenue YTD =
CALCULATE (
    [Revenue],
    DATESYTD ( Dates[Date] )
)

The running total goes from €18,000 at the end of January to €38,000 at the end of February and €64,000 at the end of March. With no filter on the months, it stays at €64,000 from April to December: on a line chart, that plateau suggests a finished year.

The figure brings the two period traps together.

Two charts over the twelve months of the year. On the left, monthly revenue for 2025, in gray, and 2026, in blue: 2026 stops in March, with €18,000, €20,000 and €26,000; 2025 has €16,000, €21,000 and €23,000, then €12,000 in April, in orange, counted in the prior year but absent from 2026. From January to March, growth is +6.7% (€64,000 vs. €60,000), in green; over the full year it drops to −11.1% (€64,000 vs. €72,000), in orange, wrong. On the right, YTD revenue rises to €18,000, €38,000 and then €64,000 at the end of March, then stays flat at €64,000 from April to December: a dotted orange plateau, although no sales took place.Two charts over the twelve months of the year. On the left, monthly revenue for 2025, in gray, and 2026, in blue: 2026 stops in March, with €18,000, €20,000 and €26,000; 2025 has €16,000, €21,000 and €23,000, then €12,000 in April, in orange, counted in the prior year but absent from 2026. From January to March, growth is +6.7% (€64,000 vs. €60,000), in green; over the full year it drops to −11.1% (€64,000 vs. €72,000), in orange, wrong. On the right, YTD revenue rises to €18,000, €38,000 and then €64,000 at the end of March, then stays flat at €64,000 from April to December: a dotted orange plateau, although no sales took place.
With no limit on the period, growth drops to −11.1% and the year-to-date total stretches out to December.

The fix is the same for both: filter the report to completed months, or write a measure that stops at the last sales date.

4. Variance to budget

Variance to budget takes three measures: the budget, the variance in euros, then the variance as a percentage, which names its steps with VAR and RETURN so it reads from top to bottom.

Budget Revenue = SUM ( Budget[Amount] )

Budget Variance = [Revenue] - [Budget Revenue]

Budget Variance % =
    VAR Actual = [Revenue]
    VAR Planned = [Budget Revenue]
    RETURN
        DIVIDE ( Actual - Planned, Planned )

For the quarter, the company beats its €63,000 budget by €1,000, or +1.6%, after a January that fell €2,000 short (−10.0%).

The trap: slicing the variance by a dimension the budget ignores. By category, the €63,000 repeats on every row: Tools shows −€34,600 (28,400 − 63,000), Paint −€58,000 (5,000 − 63,000). The filter does not reach Budget, because there is no relationship. No formula fixes this: you need a budget by category, related to the model.

5. Margin rate

A rate is calculated last: add up the margin, add up revenue, then divide. DIVIDE returns a blank value rather than an error when the denominator is zero; Microsoft recommends it in that case.

Margin = [Revenue] - [Cost of Sales]

Margin % = DIVIDE ( [Margin], [Revenue] )

The quarter’s gross margin reaches €15,540, or 24.3% of revenue: 22.2% in January, 24.5% in February, 25.5% in March.

The trap: a “Line Margin %” calculated column, then an average, which shows 28.2% instead of 24.3%.

Line Margin % =
DIVIDE (
    Sales[Amount] -
        Sales[Quantity] *
        Sales[Unit Cost],
    Sales[Amount]
)

Wrong Margin % =
AVERAGE ( Sales[Line Margin %] )

The quarter’s ten sales show where the gap comes from.

The quarter’s ten sales, each shown as a bar proportional to its amount excl. VAT and labeled with its margin rate, from 15% to 40%. Two bars are highlighted: the €2,000 sale at 40% and the €12,000 sale at 15%, which carry the same weight in a simple average even though the first brings in six times less revenue. In orange, wrong: the simple average of the ten rates, 28.2%. In green, correct: total margin divided by total revenue, 15,540 ÷ 64,000 = 24.3%, 3.9 points lower.The quarter’s ten sales, each shown as a bar proportional to its amount excl. VAT and labeled with its margin rate, from 15% to 40%. Two bars are highlighted: the €2,000 sale at 40% and the €12,000 sale at 15%, which carry the same weight in a simple average even though the first brings in six times less revenue. In orange, wrong: the simple average of the ten rates, 28.2%. In green, correct: total margin divided by total revenue, 15,540 ÷ 64,000 = 24.3%, 3.9 points lower.
The average of the rates shows 28.2%; the quarter’s real margin is 24.3%.

The simple average gives the same weight to a €2,000 sale at 40% and a €12,000 sale at 15%: 3.9 points of margin that do not exist.

6. Share of total

REMOVEFILTERS removes the category filter from the denominator; the date filters stay, so the share reads over the period displayed. It is the equivalent of an absolute reference in Excel ($D$19).

% of Total =
DIVIDE (
    [Revenue],
    CALCULATE (
        [Revenue],
        REMOVEFILTERS ( Products )
    )
)
CategoryRevenue% of TotalMargin %
Tools28,40044.4%31.5%
Electrical30,60047.8%15.0%
Paint5,0007.8%40.0%
Total64,000100.0%24.3%

Last column: 24.3% is not the average of the three rates. The share-of-total trap: DIVIDE ( [Revenue], SUM ( Sales[Amount] ) ), whose denominator gets the same filter as the numerator, shows 100.0% on every row. Hard-coding the total gives a wrong figure as soon as the next month comes in.

The quarterly review, all measures together

MonthRevenueRevenue PYYoY %Revenue YTDBudgetVarianceVar. %Margin %
January18,00016,000+12.5%18,00020,000−2,000−10.0%22.2%
February20,00021,000−4.8%38,00019,000+1,000+5.3%24.5%
March26,00023,000+13.0%64,00024,000+2,000+8.3%25.5%
Total64,00060,000+6.7%64,00063,000+1,000+1.6%24.3%

The read-out for management: €64,000 of revenue, +6.7% year over year, €1,000 above budget, a 24.3% margin. Six KPIs, or about ten short measures, that recalculate on their own when April’s sales come in.

Which DAX functions should you know when you come from Excel?

About twenty DAX functions are enough for an SME’s management dashboard, and most have an Excel equivalent: SUM stays SUM, SUMIFS becomes CALCULATE, SUMPRODUCT becomes SUMX.

On the Excel side, Sales sits in A1:E18, with the category in column F, the margin in G and the total in D19:

What you wantIn ExcelIn DAXWhat changes
Add up a column=SUM(D2:D18)SUM ( Sales[Amount] )The rows are chosen by the report’s filters.
Add up with a condition=SUMIFS(D2:D18,F2:F18,"Tools")CALCULATE ( [Revenue], Products[Category] = "Tools" )The condition becomes a filter, which can apply to another table.
Multiply, then add up=SUMPRODUCT(C2:C18,E2:E18)SUMX ( Sales, Sales[Quantity] * Sales[Unit Cost] )Same logic, row by row: an iterator.
Look up a value=VLOOKUP(B2,Products,3,FALSE)RELATED ( Products[Category] )Most of the time, the relationship is enough; RELATED is used in a calculated column or an iterator.
Divide without errors=IFERROR(G2/D2,"")DIVIDE ( [Margin], [Revenue] )Division by zero returns a blank value.
Test a condition=IF(J2>=K2,"On target","Behind")IF ( [Revenue] >= [Budget Revenue], "On target", "Behind" )You compare measures, not cells (here J2 and K2, the month’s revenue and budget).
Share of total=D2/$D$19DIVIDE ( [Revenue], CALCULATE ( [Revenue], REMOVEFILTERS ( Products ) ) )The absolute reference becomes “remove this filter.”
Running total since January=SUM($D$2:D4)CALCULATE ( [Revenue], DATESYTD ( Dates[Date] ) )The expanding range becomes a period.
Compare with last yearA prior-year column maintained by handCALCULATE ( [Revenue], SAMEPERIODLASTYEAR ( Dates[Date] ) )The measure shifts the dates.
Count distinct values=COUNTA(UNIQUE(B2:B18))DISTINCTCOUNT ( Sales[Product Code] )Here: 4 products in the quarter, 3 in January.

A value field in a pivot table becomes a measure, written once in the model and shared by every report.

How many DAX functions do you need to know?

Microsoft says “over 200 functions” on one page and “over 250” on another. The table of contents of the DAX reference (French edition) listed 462 function pages on November 10, 2026, in 15 groups. This article uses 21.

GroupFunctions in the referenceUsed here
Aggregation22SUM, SUMX, AVERAGE, DISTINCTCOUNT
Date and time24CALENDAR, DATE, YEAR, MONTH
Filter31CALCULATE, KEEPFILTERS, REMOVEFILTERS, ALL
Time intelligence41SAMEPERIODLASTYEAR, DATESYTD, TOTALYTD, DATEADD
Logical15IF
Math and trig49DIVIDE
Relationship4RELATED
Table manipulation32ADDCOLUMNS
Text21FORMAT
Information, statistical, financial, parent and child, other151none
INFO (model description)72none
Total46221

Do not learn the catalog: the 72 INFO functions, for example, describe the model itself. The count changes with every release, and older versions of Power BI Desktop, Analysis Services or Power Pivot do not have every function.

To look up a function: Microsoft Learn’s DAX function reference; DAX Guide, maintained by SQLBI, the company of Marco Russo and Alberto Ferrari; DAX Formatter, a free tool from the same publisher, which reformats an unreadable formula.

To learn in order: Microsoft Learn’s free learning path on DAX in Power BI semantic models, then The Definitive Guide to DAX and DAX Patterns. A plan by role is in our Power BI training guide.

Why does a DAX measure return a wrong number?

A wrong measure gives no warning: it shows a number. Almost always, the cause is a filter that does not arrive, two totals multiplied, an average of rates or a period with no end date. Start from the symptom:

What you seeLikely causeFix
The same number repeats on every row.No relationship carries the filter, or CALCULATE replaced it.Create the relationship, or wrap the filter in KEEPFILTERS.
A total is not the sum of its rows.Normal for a rate or a distinct count: the total is recalculated.Nothing; check it once by hand.
A cost reaches an absurd amount.SUM of quantity × SUM of price.Calculate row by row with SUMX.
A margin rate that looks too good.An average of rates calculated per row.Divide the sum of margins by the sum of revenue.
Prior year or YTD is blank or wrong.No complete, marked date table, or the Sales date was used.A Dates table with no gaps, related, marked and used everywhere.
YTD runs flat; prior year looks too big.The period goes past the last sales date.Limit the report or the measure to completed months.
A number does not move when the period changes.It is stored in a calculated column.Rewrite it as a measure.
A copied formula is rejected.Comma or semicolon, or different table names.Adjust the separator and the names.

The check fits in one sentence: test each measure on a small dataset whose answer you know, in a table by month and then by category. That is what the seventeen rows of the distribution company are for.

When is DAX not the right answer?

DAX is not the right answer when the problem lies elsewhere: dirty data, a shaky model, a one-off question, a calculation specific to one visual, an unreadable formula. A cleverer measure then hides the problem without solving it.

  • The data is dirty. Total rows, duplicates, dates stored as text: these are fixed on import, in Power Query.
  • The model is shaky. One big flat table, a budget copied onto every row, a missing relationship: fix the model first.
  • The question is a one-off. A pivot table answers it in two minutes.
  • The calculation is only for one visual. Visual calculations work on the data displayed, without dealing with filter context.
  • Nobody will be able to read the formula. Copilot writes DAX for you; you still have to check the result on a known case.

Learn it or outsource it? If you build your own reports, these ideas are the right investment; if not, insist on documented measures. The FP&A analyst (contrôleur de gestion in France) then has nothing left to argue about with accounting: the quarter’s margin is 24.3%, and the same measure will give it in April.

Frequently asked questions

Can you use DAX in Excel?

Yes, in Power Pivot, Excel’s Data Model: measures are written in DAX there and displayed in a PivotTable. Cell formulas such as SUM or VLOOKUP, on the other hand, are not DAX formulas.

Do you need to learn DAX to use Power BI?

Not to read a report: filtering, exploring and exporting require no formulas. Yes to build a reliable one: a rate, a comparison with last year or a variance to budget all require measures. Copilot can suggest them, but someone has to be able to check them.

What is DAX Studio for?

DAX Studio is an external tool, developed outside Microsoft, to write, execute and analyze DAX queries in Power BI Desktop, Power Pivot and Analysis Services. It is mainly used to check what a formula returns and to understand why a report is slow. To write your first measures, Power BI Desktop is enough.

Let’s talk about your reporting.

A 30-minute video call with Dylan Arnaud. You come away with a clear scope and a fixed price.

Dylan Arnaud, Power BI consultant and founder of Datafuji
Dylan ArnaudFounder · your single point of contact