DAX (Data Analysis Expressions) is the formula language behind every Power BI measure, calculated column and calculated table. This page brings together the step-by-step DAX guides written by Data Bear’s trainers and consultants, grouped by topic, so you can find the function you need or work through the concepts in order.
New to DAX? Start with row context and filter context, then CALCULATE. Everything else builds on those three ideas.
Core DAX concepts
- DAX row context explained: how DAX evaluates a formula one row at a time in calculated columns and iterators.
- Power BI filter context: how slicers, visuals and filters decide which rows a measure sees.
- DAX context transition: what happens when CALCULATE turns row context into filter context.
- Measures vs calculated columns: when to use each, and why the choice matters for model size.
- Steps to write a DAX measure: a simple routine for writing your first measures.
- DAX variables: making measures easier to read and debug, and often faster.
- DAX X functions (iterators): SUMX, AVERAGEX and the other functions that work row by row.
- Common Power BI DAX measures: SUM, SUMX, CALCULATE and other everyday measures.
- Top 5 DAX functions every analyst should know: five essential functions with practical examples.
CALCULATE and filter functions
- CALCULATE: the most important function in DAX, and how it changes the filter context.
- ALL and REMOVEFILTERS: removing filters to calculate totals and percentages.
- ALL, ALLSELECTED and ALLEXCEPT: three ways to ignore filters, compared.
- KEEPFILTERS: adding a filter without overwriting the existing one.
- FILTER and ALL (table functions, part 1).
- TREATAS: filtering by several slicer items and applying virtual relationships.
- Value filter behaviour: how the Coalesced and Independent settings change the way filters reach your DAX.
Lookups and relationships
- LOOKUPVALUE: fetching a value from another table without a relationship.
- RELATED and RELATEDTABLE: following relationships to join and aggregate.
- The RELATED function in more detail.
- CROSSFILTER: controlling relationship direction inside a measure.
Table functions
- VALUES: handling the blank row and invalid relationships.
- VALUES, DISTINCT and ALLNOBLANKROW: how each treats the blank row.
- VALUES with SUMMARIZE: grouping and summarising inside a measure.
- Table constructors: creating small custom tables with DAX.
- Grouping with DAX measures: five measures for grouping items.
Ranking and Top N
- The RANK function: the newer, simpler way to rank in DAX.
- RANKX: ranking with the classic iterator.
- RANKX vs TOPN: which to use for dynamic rankings.
- TOPN: returning the top rows of a table.
- Pareto chart with DAX: an 80/20 analysis step by step.
Dates and time intelligence
- SAMEPERIODLASTYEAR, PARALLELPERIOD and DATEADD: comparing periods.
- Year-to-date values, including comparing year to date with last year.
- Calendar tables with DAX, and custom calendars for fiscal years.
- NETWORKDAYS: counting working days between two dates.
- Expressing date and time values in DAX.
Selections, logic and dynamic reports
- SELECTEDVALUE: reading what a user picked in a slicer, and showing selected values in titles and visuals.
- IF.EAGER: when forcing eager evaluation can be faster than IF, and when it isn’t.
- RAND and RANDBETWEEN: random numbers and test data with DAX.
- Dynamically switching axes with DAX.
- A dynamic single slicer using DAX logic and slicer validation with DAX.
- Dynamic format strings.
- Changing colours with DAX and conditional formatting.
- Dealing with blank values.
- Fixing incorrect totals with DAX.
- Combining related values into one description.
- The VALUE function: converting text to numbers.
- Error handling in Power Query and DAX.
Calculation groups and reusable DAX
- Calculation groups: how to create and use them, with a time-intelligence example.
- DAX user-defined functions (UDFs) and calculation groups.
- Reusable DAX: keeping logic in one place with user-defined functions.
- Visual calculations and visual DAX.
DAX tools and performance
- DAX query view in Power BI Desktop: writing and testing DAX queries against your model.
- DAX fusion: writing measures the engine can run faster.
- Removing unused measures with Measure Killer.
- Writing and checking DAX with Copilot, and using DAX Studio with ChatGPT.
Learn DAX with a trainer
Our Power BI Advanced course covers DAX in depth over two days: row and filter context, CALCULATE, time intelligence, iterators and what-if analysis, with hands-on labs. If you are newer to Power BI, Foundations Plus adds an introduction to DAX to the Foundations course. See all Power BI training courses and dates.