TutorialsPower BIDAX Introduction

DAX Introduction

What DAX is, how it works, and why it is the most important Power BI skill to master

DAX stands for Data Analysis Expressions. It is the formula language of Power BI (and also Power Pivot and SSAS Tabular). DAX is what you use to create calculations that go beyond simple aggregations — year-over-year growth, running totals, market share percentages, and complex business logic. Every time you want to calculate something that is not just a SUM or COUNT of a column, you write a DAX formula. DAX formulas are written in measures or calculated columns — two different things that beginners often confuse. The mental model for DAX: unlike Excel formulas that work row-by-row, DAX formulas work on entire tables. The result changes depending on what filters are applied — this concept is called "filter context" and it is the most important thing to understand in DAX.
Anatomy of a DAX Measure
Total Sales = SUM(Sales[Amount])
Measure name
Total Sales
How it appears in Fields pane
DAX function
SUM()
200+ built-in functions
Table name
Sales
Always TableName[Column]
Column name
[Amount]
Square brackets required
Excel formula
=SUM(A2:A100)
Fixed range — breaks when rows are added
DAX measure
SUM(Sales[Amount])
Dynamic — responds to all filters

Example

Your first DAX measure
WHERE TO WRITE DAX:
  Modeling tab → New Measure
  OR right-click a table in Fields pane → New Measure

BASIC MEASURES:
Total Sales = SUM(Sales[Amount])
Order Count = COUNTROWS(Sales)
Average Order = AVERAGE(Sales[Amount])
Max Sale    = MAX(Sales[Amount])
Min Sale    = MIN(Sales[Amount])

HOW TO NAME MEASURES:
  Use clear, readable names with spaces
  ✓ Total Revenue
  ✓ Sales Last Year
  ✗ rev
  ✗ calc1

WHERE DO MEASURES LIVE:
  Measures appear in the Fields pane under the table
  you created them in (shown with a calculator icon 🔢)
  Best practice: create a dedicated "Measures" table
💡 Measures are evaluated in context — the same measure shows different results when filtered by Region, Year, or Product.

Key Points

  • DAX measures are calculated on the fly — they respond to every filter, slicer, and visual
  • Measures (dynamic) vs Calculated Columns (static) — use measures for almost everything
  • Filter context: the set of filters active when a measure is evaluated — the key concept in DAX
  • DAX functions are similar to Excel functions but work on entire table columns, not ranges
  • Start every DAX journey with SUM, COUNT, AVERAGE, CALCULATE — master these four first

FAQ

Q: Is DAX similar to Excel formulas?
A: DAX syntax looks similar to Excel — functions, parentheses, commas. But the logic is different. Excel formulas work cell-by-cell. DAX formulas work on entire columns and respond to filter context. SUMIF in Excel becomes CALCULATE(SUM(...), FILTER(...)) in DAX. The transition takes 2–4 weeks of practice.
Q: Do I need to know SQL to learn DAX?
A: No — but SQL thinking helps. If you know SQL's WHERE clause, you will understand DAX's FILTER() function faster. If you know SQL GROUP BY, you will understand how DAX aggregates in visual context. They are different languages but share the concept of filtering and aggregating tabular data.

Practice Question

Which Power BI pane do you use to write a new DAX measure?