DAX (Data Analysis Expressions) is the formula language used in Power BI to create custom calculations, measures and calculated columns within the data model. Unlike Excel formulas, DAX works on entire tables and the relationships between them, which enables dynamic calculations that respond automatically to the filters the user applies in the report.
This guide explains the essential DAX concepts for beginners: the difference between measures and calculated columns, the most commonly used functions and practical examples to get started from scratch.
What is DAX and what is it for in Power BI?
DAX is the language used to create calculations in Power BI, Excel (Power Pivot) and Analysis Services. It turns raw data into business information: sums, averages, period comparisons, share percentages and any calculation that depends on the filter context applied in the report.
The main difference between DAX and a traditional spreadsheet formula is the concept of context: the same DAX calculation can return different values depending on which filters, slicers or selections are active on the user’s screen, without rewriting the formula for each situation.
Measures vs calculated columns: what is the difference?
This is the most common question for DAX beginners. Calculated columns are computed when the column is defined and again on every dataset refresh; measures are computed at query time, that is, when they are displayed in the report.
When to use a calculated column
Use a calculated column when the calculation needs to exist row by row, such as categorizing a value (“High”, “Medium”, “Low”) or concatenating text from different columns. The result is stored in the model, which increases file size but lets you use the column in filters and groupings.
When to use a measure
Use a measure when the calculation needs to sum, average or aggregate values according to the report’s filter context. Measures are not precalculated or stored on disk: they are recalculated dynamically as the user interacts with the report, which makes them more efficient for most business calculations.
Rule of thumb: if you are working at row level (something that varies by individual record), use a calculated column. If you are summarizing or aggregating data (sum, average, count), use a measure.

Essential DAX functions to get started
CALCULATE
CALCULATE is the most important DAX function and the only one that can modify the filter context of a calculation. In practice, it lets you say “do this calculation, but only for a specific slice of the data”, such as calculating sales of a specific product regardless of the filter the user applied on screen.
SUM, AVERAGE and COUNT
The basic aggregation functions sum, average or count values in a column. They are the starting point for most measures in a report.
SUMX and other iterator functions
Functions ending in “X” (SUMX, AVERAGEX, COUNTX) go through a table row by row, applying an expression before aggregating the result. They are essential for calculations that need to multiply or combine columns before summing, such as “quantity x unit price” per sales line.
DIVIDE
Replaces the traditional division operator (/) and automatically handles division by zero, so the report does not break when the denominator of a calculation (such as a conversion rate) is zero.
Time intelligence functions (SAMEPERIODLASTYEAR, DATEADD)
They let you compare a period with the same period last year or with any shifted time range, essential for growth and seasonality KPIs.
Practical DAX measure examples
A simple total sales measure:
Total de Vendas = SUM(Vendas[Valor])
A measure comparing total sales with the same month last year:
Vendas Ano Anterior = CALCULATE(
[Total de Vendas],
SAMEPERIODLASTYEAR('Calendário'[Data])
)
A growth percentage measure that already handles division by zero:
Crescimento % = DIVIDE(
[Total de Vendas] - [Vendas Ano Anterior],
[Vendas Ano Anterior]
)
These three examples already cover a good part of the needs of a goal-tracking and trend dashboard.
Common mistakes when learning DAX
Using a calculated column when you should use a measure. This unnecessarily increases model size and reduces the calculation’s flexibility with filters.
Not understanding filter context. Much of the initial confusion with DAX comes from not understanding that the same calculation behaves differently depending on what is filtered on screen.
Ignoring data model performance. A poorly built data model (wrong relationships, unnormalized tables) makes even simple DAX formulas slow. Modeling comes before the formula.
How to keep improving in DAX?
Once you master the basics, the next step is to understand the underlying data model well: relationships, fact and dimension tables and the star schema, since modeling quality directly affects the complexity (and performance) of the DAX formulas you need. See our guide on data modeling to understand how this fits into a real project, and how to build a Power BI dashboard step by step to apply DAX in practice.
When calculation needs grow in complexity (advanced financial KPIs, attribution models, multidimensional comparisons), it is worth considering support from a specialized Power BI consultancy to speed up the learning curve and avoid data models that are hard to maintain later.
DAX in Power BI: frequently asked questions
Is DAX hard to learn?
The basics (SUM, AVERAGE, CALCULATE) are accessible to anyone who already uses Excel formulas. Difficulty increases when dealing with filter context and iterator functions, which require a different logic from spreadsheets.
Do I need to know DAX to use Power BI?
For very simple reports, no. For any analysis that requires period comparisons, dynamic percentages or custom business KPIs, DAX is necessary.
What is the difference between DAX and Power Query (M)?
Power Query (the M language) cleans and transforms data before loading it into the model; DAX creates calculations on data already loaded. They are different stages of the same process.
Where can I practice DAX for free?
Microsoft Learn’s official documentation has free tutorials, along with communities such as the Microsoft Fabric Community, with practical examples and answers to questions.
Should I learn DAX or hire someone who already knows it?
It depends on how many dashboards the company plans to maintain. For a few one-off reports, learning the basics may be enough; for an ongoing BI program, having someone with advanced DAX skills (in-house or outsourced) avoids rework and fragile data models.
Need more robust DAX measures in your report?
If your team is struggling to go beyond DAX basics, beAnalytic has Power BI consultants to structure data models and advanced calculations. Talk to our team.
Sources: Microsoft Learn: calculation options in Power BI Desktop, SQLBI: calculated columns and measures in DAX.
Gabriela Melo é estrategista de conteúdo na beAnalytic, especializada em SEO e GEO. Com foco na criação de conteúdos otimizados para posicionar temas de Business Intelligence e Engenharia de Dados.

