Preloader spinner
Business professionals working together with a laptop, tablet and mobile device

DAX, or Data Analysis Expressions, is the formula language used to create calculations in Power BI data models. It allows you to turn imported data into useful business measures such as total sales, profit margin, year-to-date revenue, customer counts and comparisons against previous periods.

If you already use Excel formulas, some DAX functions will look familiar. However, DAX works with tables, relationships and filter context, so learning it involves more than memorising function names.

What does DAX stand for?

DAX stands for Data Analysis Expressions.

Microsoft uses DAX across Power BI, Power Pivot in Excel and tabular data models. In Power BI, it is most commonly used to create measures and calculated columns, although it can also be used for calculated tables and row-level security rules.

Why is DAX important in Power BI?

Power BI can create useful reports without complex formulas, but DAX becomes important when your analysis needs to go beyond simply displaying fields from the source data.

For example, you might need to calculate:

  • total revenue
  • average order value
  • gross profit margin
  • number of distinct customers
  • percentage of total sales
  • year-to-date performance
  • sales for the same period last year
  • variance against a target
  • rolling averages
  • results for a particular category while ignoring another filter

DAX gives the data model the logic needed to answer those questions dynamically as users filter and interact with the report.

What is a DAX measure?

A measure is a calculation whose result is evaluated when it is needed and changes according to the context of the report.

A very simple measure might be:

Total Sales = SUM(Sales[Sales Amount])

If that measure is placed in a card, it might show total sales for the whole dataset. Put the same measure in a chart by region and Power BI calculates the result separately for each region. Apply a year slicer and it recalculates again for the selected year.

This responsiveness is one of the most important characteristics of DAX measures.

What is a calculated column?

A calculated column adds a new column to a table in the data model using a DAX expression.

The expression is evaluated for each row. For example, a calculated column could combine two existing text fields or classify each transaction into a category.

Unlike a measure, the resulting values are stored in the model and do not recalculate simply because a user changes a slicer or report filter.

Measures vs calculated columns

This is one of the first distinctions a Power BI learner should understand.

Use a calculated column when you need a value for every individual row and that value may then be used for grouping, filtering or relationships.

Use a measure when you need a result that should respond dynamically to the filters and selections in a report.

For example:

  • A customer's age band might be a calculated column.
  • Total sales for the selected month would usually be a measure.
  • A product category label could be a calculated column.
  • Percentage of total revenue would normally be a measure.

As your Power BI skills develop, you will generally create many more measures than calculated columns for analytical calculations.

What is context in DAX?

Context is the idea that makes DAX different from many ordinary spreadsheet formulas.

The same measure can return different values depending on which rows of data are currently relevant.

Two concepts are particularly important:

  • Row context, which can be thought of as the current row.
  • Filter context, which represents the filters currently applied to the calculation.

What is row context?

Row context is most obvious in calculated columns. Power BI evaluates the formula for the current row, then moves to the next row and evaluates it again.

Iterator functions such as SUMX also create a row-by-row evaluation over a table.

Understanding row context helps explain why a calculated column behaves differently from a measure.

What is filter context?

Filter context is the set of filters that determine which data is included when a measure is evaluated.

Filters can come from:

  • slicers
  • report, page or visual filters
  • rows and columns in a visual
  • relationships between tables
  • DAX expressions themselves

Suppose you have a Total Sales measure. A report filtered to London creates one context; selecting Manchester creates another. The formula itself has not changed, but the data included in the calculation has.

Why is CALCULATE so important?

CALCULATE is one of the most important functions in DAX because it evaluates an expression in a modified filter context.

For example, you might already have:

Total Sales = SUM(Sales[Sales Amount])

You could then build another measure that calculates sales only for a particular category by using CALCULATE with an additional filter.

Once learners understand measures, filter context and CALCULATE, many more advanced DAX patterns begin to make sense.

Which DAX functions should beginners learn first?

You do not need to learn hundreds of functions at the start. A relatively small group covers a large proportion of everyday Power BI calculations.

Useful functions to learn first include:

  • SUM for adding numeric values
  • AVERAGE for calculating a mean
  • MIN and MAX for lowest and highest values
  • COUNT and COUNTROWS for counting values or rows
  • DISTINCTCOUNT for counting unique values
  • IF for conditional logic
  • DIVIDE for safe division
  • CALCULATE for changing filter context
  • SUMX for row-by-row calculations before aggregation

Date and time-intelligence functions become particularly useful once your model includes a proper Date table.

What is the difference between SUM and SUMX?

SUM simply adds the values in a column.

SUMX is an iterator. It evaluates an expression for each row of a table and then adds the results.

For example, if a Sales table contains Quantity and Unit Price but does not contain a stored Revenue column, SUMX can calculate Quantity × Unit Price for each row and then total those results.

This distinction introduces an important DAX idea: some functions aggregate existing columns, while iterator functions evaluate expressions row by row.

What is DISTINCTCOUNT used for?

DISTINCTCOUNT counts the number of unique values in a column.

This is extremely common in business reporting. You may have thousands of sales transactions but want to know how many individual customers placed those orders. Counting rows would tell you the number of transactions; DISTINCTCOUNT on Customer ID would tell you the number of customers.

Why use DIVIDE instead of the / operator?

Both approaches can perform division, but the DAX DIVIDE function is useful because it provides built-in handling for division by zero.

That makes it a common choice for ratios and percentages such as margin percentage, conversion rates and average values.

What is a DAX variable?

Variables let you store the result of an expression and reuse it within a calculation.

They can make longer measures easier to read, troubleshoot and maintain.

A DAX formula can declare one or more variables with VAR and then return the final expression using RETURN.

Variables become increasingly useful as measures move beyond simple one-line formulas.

Does DAX replace Power Query?

No. DAX and Power Query perform different jobs.

Power Query is primarily used before the data enters the model. It connects to sources and cleans, reshapes and combines data.

DAX is primarily used after data has been loaded into the model. It creates calculations that work with the model and respond to report context.

A useful rule is: use Power Query to prepare the data, then use DAX to analyse it.

This distinction is also discussed in our Power Query vs Power Pivot article.

Does DAX replace Excel formulas?

No. The two formula languages solve different kinds of problems.

Excel formulas are normally based on cells and ranges in a worksheet. DAX is based on tables, columns, relationships and evaluation context in a data model.

Some familiar functions share similar names, which can make DAX easier for experienced Excel users to start learning, but the underlying modelling concepts are different.

Do you need DAX to use Power BI?

You can create useful beginner reports without writing much DAX. Power BI can aggregate fields automatically and many reporting tasks can be completed with standard visuals.

However, anyone who wants to build robust business reports will eventually need DAX. It becomes essential when you need reusable measures, ratios, comparisons, time-based calculations and logic that responds correctly to filters.

When is DAX taught in the ExperTrain Power BI pathway?

The Power BI Desktop Introduction course introduces simple calculated-column calculations using arithmetic operators.

The Power BI Desktop Intermediate course introduces DAX more formally, including calculated columns and measures using aggregation, text, logical, filter, maths and date functions.

The Power BI Desktop Advanced course then builds on those foundations with more advanced modelling and calculation techniques.

If you are unsure which level is appropriate, see Power BI Introduction vs Intermediate: Which Course Should You Take?.

How should a beginner learn DAX?

A practical sequence is:

  1. Learn the difference between a column and a measure.
  2. Create simple measures using SUM, COUNT and DISTINCTCOUNT.
  3. Use those measures in visuals and observe how slicers change the results.
  4. Understand filter context.
  5. Learn CALCULATE.
  6. Explore iterators such as SUMX.
  7. Introduce date calculations and time intelligence.
  8. Practise with a well-structured data model containing relationships between tables.

Trying to memorise dozens of functions before understanding context usually makes DAX feel more difficult than it needs to be.

Common DAX mistakes for beginners

  • Creating calculated columns when a measure would be more appropriate.
  • Ignoring relationships between tables.
  • Using a complex formula before checking whether the data model is structured correctly.
  • Expecting a measure to behave like a copied Excel cell formula.
  • Trying to fix data-cleaning problems in DAX that would be better handled in Power Query.
  • Learning advanced time intelligence before understanding filter context.

Frequently asked questions

Is DAX a programming language?

DAX is generally described as a formula or expression language rather than a general-purpose programming language. It is specifically designed for calculations and querying within tabular data models.

Is DAX difficult to learn?

Basic functions are straightforward, especially for experienced Excel users. The more challenging part is understanding context, relationships and how measures are evaluated. Once those concepts are clear, the language becomes much more logical.

Can I use DAX in Excel?

Yes. DAX is used in Power Pivot and the Excel Data Model as well as Power BI.

Should I learn Power Query or DAX first?

For most learners, basic Power Query and data-modelling concepts should come before advanced DAX. Clean, well-structured data makes calculations much easier to build and understand.

What is the most important DAX function?

There is no single function for every task, but CALCULATE is particularly important because it allows you to modify filter context and is central to many analytical patterns.

Next steps for learning Power BI

If you are new to the platform, start with Power BI Desktop Introduction. If you already create basic reports and want to learn Power Query, data modelling and DAX measures, Power BI Desktop Intermediate is the natural next step.

You can also browse the Power BI Glossary for explanations of DAX, measures, calculated columns, relationships and other Power BI terminology, or read Power BI vs Excel for a broader comparison of the two tools.

Keep ExperTrain in your Google results

Found this article useful? Add ExperTrain as a Preferred Source on Google to help surface more of our training guides, articles and learning resources.

Join our mailing list

Receive details on our new courses and special offers

Thank you! Your submission has been received!
Oops! Something went wrong while submitting the form.