Databases · DBC-29

Advanced DAX in Power BI

Advanced DAX in Power BI is a course that goes deep into row context, filter context and context transition, then moves on to table functions, window functions, calculation groups, DAX user-defined functions and performance tuning with VertiPaq. It suits data analysts, Power BI report developers and BI teams who already write basic DAX and want measures that are correct and fast.

Updated
From 6,750 THB / person 7,500 −10% excl. VAT 7% · group rates available
PDFDownload the course outline
  • Duration12 hours · 2 days
  • FormatOnsite / live online
  • Next roundOn request
  • CertificateIncluded

Course overview

Many teams can already write DAX, yet they still meet measures that return wrong figures when a slicer changes, totals that do not match the sum of their rows, formulas so long that nobody dares to edit them, and reports that slow down as the data grows. The cause is rarely the choice of function. It is usually an incomplete understanding of evaluation context, context transition and how the Power BI engine actually processes a formula.

This course takes learners systematically through the mechanics of DAX: variables and iterators, row context and filter context, CALCULATE and context transition, table functions and advanced relationships, and newer tools such as window functions, calculation groups, DAX user-defined functions and DAX query view. It closes with performance analysis through the formula engine, the storage engine and VertiPaq. Every topic is practised on business questions using the same model throughout the course.

What you’ll gain

  • Explain and control row context, filter context and context transition correctly
  • Write readable, testable measures with variables, iterators and DAX query view
  • Use table functions and advanced relationships such as USERELATIONSHIP and TREATAS
  • Build calculation groups and DAX user-defined functions to remove duplicated logic
  • Apply window functions and advanced time intelligence to business questions
  • Analyse and improve the performance of DAX and the data model

Who this course is for

  • Data analysts and Power BI report developers who already write DAX and want a deeper understanding
  • Data scientists and digital marketers who use Power BI for multi-dimensional analysis
  • BI teams who maintain shared semantic models used by many reports
  • People who have completed a foundation Power BI or DAX course

Prerequisites

  • Able to build reports and data models in Power BI Desktop
  • Able to write basic DAX measures such as SUM, DIVIDE and simple CALCULATE
  • A basic understanding of star schemas and relationships
  • A Windows laptop that can run the latest Power BI Desktop, with permission to install software

Curriculum

Course Details

This course is the 2026 edition of Advanced DAX in Power BI Desktop, rewritten for the current Power BI Desktop. It runs for 2 days, 6 hours per day (12 hours in total, 09:00-16:00), as lectures with labs on a single sales model throughout. Intermediate to Advanced level. Day one goes deep into evaluation context, CALCULATE, context transition, table functions and advanced relationships. Day two practises advanced time intelligence, window functions, calculation groups, DAX user-defined functions and performance tuning with VertiPaq. The course builds on Analyzing Data with Power BI Desktop and Basic DAX in Power BI Desktop, so it does not repeat data preparation or dashboard design. Learners take home the Power BI files and DAX exercises for every lab.

Day 1 Inside DAX Evaluation Context

Section 1: Lab: Variables, Iterators and Testing with DAX Query View

  • DAX query view (EVALUATE, DEFINE MEASURE) and TMDL view for checking and editing the model
  • VAR and RETURN make formulas readable, evaluate once and help debugging
  • How SUMX, AVERAGEX and MAXX work row by row, and how nested iterators affect speed
  • RANKX and CONCATENATEX for ranking and inspecting values inside a formula
  • Lab: profit and product ranking measures, checked with a query before they go into a visual

Section 2: Lab: Row Context, Filter Context and Relationships

  • Where row context comes from, and why it does not filter data by itself
  • Filter context from slicers, visual rows and columns, and the filter pane
  • RELATED, RELATEDTABLE and how filters flow through relationships
  • Bidirectional cross-filter direction and the risks it brings
  • Lab: trace why a total does not equal the sum of its rows

Section 3: Lab: CALCULATE in Depth and Context Transition

  • The order in which CALCULATE works and how it overrides existing filters
  • KEEPFILTERS, REMOVEFILTERS, ALL, ALLEXCEPT and ALLSELECTED
  • Context transition in calculated columns and inside iterators
  • Referencing a measure inside an iterator, which wraps it in CALCULATE automatically
  • Lab: a share-of-sales measure that stays correct when users combine several filters

Section 4: Lab: Table Functions and Virtual Tables in Measures

  • FILTER compared with Boolean conditions in CALCULATE
  • VALUES, DISTINCT, SUMMARIZECOLUMNS, ADDCOLUMNS and SELECTCOLUMNS
  • TOPN and building virtual tables for further calculation inside a measure
  • Checking virtual tables in DAX query view before using them
  • Lab: sales from the top 10 customers compared with all others

Section 5: Lab: Advanced Relationships

  • Role-playing dates and USERELATIONSHIP with inactive relationships
  • CROSSFILTER to change filter direction inside a single measure
  • TREATAS to build virtual relationships between tables at different grains
  • Many-to-many relationships and bridge tables without wrong figures
  • Lab: actual sales against a budget stored by month and product group
Day 2 Modern, Reusable and Fast DAX

Section 6: Lab: Advanced Time Intelligence

  • A correct date table and fiscal years that do not start in January
  • Rolling totals with DATESINPERIOD and moving averages
  • Semi-additive measures for balances and closing stock
  • An overview of calendar-based time intelligence for week-based calendars (preview)
  • Lab: rolling 12-month sales and month-end stock on hand

Section 7: Lab: Window Functions

  • How OFFSET, INDEX and WINDOW differ
  • How ORDERBY, PARTITIONBY and MATCHBY set order and groups
  • Previous-period comparisons, running totals and ranking within groups
  • When to use window functions and when to use visual calculations
  • Lab: month-on-month sales by product group without relying on the date table

Section 8: Lab: Calculation Groups

  • The problem of dozens of duplicated measures, and the idea behind calculation groups
  • Creating a calculation group in Model view in Power BI Desktop
  • SELECTEDMEASURE and format string expressions
  • Precedence with several calculation groups, and points to watch
  • Lab: a time comparison group (MTD, YTD, prior year, growth %) that works with every measure

Section 9: Lab: DAX User-Defined Functions

  • What DAX UDFs are, and their general availability from the June 2026 release
  • Writing a FUNCTION in DAX query view and TMDL view, then saving it to the model
  • Parameter types, subtypes and the VAL and EXPR passing modes
  • Managing functions in Model explorer and using them in measures, columns and visual calculations
  • Lab: a shared function library for margin, growth and currency conversion

Section 10: Workshop: Performance Tuning and a Measure Library

  • The formula engine and storage engine, VertiPaq encoding and column cardinality
  • Finding bottlenecks with Performance Analyzer, DAX Studio and VertiPaq Analyzer
  • Workshop: design a measure set for an executive report using UDFs and a calculation group
  • Test the figures in DAX query view, then tune slow measures and measure before and after
  • Present the work and summarise a DAX review checklist for the team

Schedule & training options

For individuals — public rounds

No public rounds are open right now. Join the waiting list and we will contact you first when the next round opens, or ask us on LINE. Or call 02-570-8449 or 088-807-9770

For organisations — in-house / private

  • Tailor the content to your team’s tools and projects
  • Your dates, at your office or live online
  • Quotation with tax ID for procurement
Corporate training quote

Instructors

Frequently asked questions

What is the difference between row context and filter context in DAX?

Row context means the formula knows which row it is evaluating. It exists in calculated columns and in iterators such as SUMX, letting you refer to column values on that row. Filter context is the set of filters affecting a calculation, coming from slicers, the rows and columns of a visual, or arguments to CALCULATE. Importantly, row context does not filter data or follow relationships on its own until context transition occurs.

What is context transition in DAX, and when does it happen?

Context transition is when CALCULATE turns an existing row context into a filter context, using the values of every column in the current row as filters. It happens when CALCULATE is called inside a calculated column or an iterator, and whenever a measure is referenced inside an iterator, because measures are automatically wrapped in CALCULATE. Misunderstanding it leads to wrong figures or slow formulas.

How do DAX user-defined functions differ from calculation groups?

DAX user-defined functions let you write parameterised logic once in the model and call it anywhere DAX is supported, for example a margin calculation or a currency conversion. Calculation groups instead modify the calculation of existing measures through SELECTEDMEASURE, for example turning every measure into YTD or prior year from a single slicer. Both reduce duplicated formulas, and real models often use them together.

How does VertiPaq compress data in Power BI, and why does the number of unique values matter?

VertiPaq stores data by column rather than by row and compresses each column using value encoding for numbers, hash encoding, which builds a dictionary of unique values, and run-length encoding, which stores repeated adjacent values as a single run. Columns with many unique values, such as timestamps to the second or transaction IDs, use more memory and slow calculations, so removing unused columns or splitting date from time keeps the model smaller. You can check this with VertiPaq Analyzer.

Who is the Advanced DAX in Power BI course for, and what should I know beforehand?

It suits data analysts, Power BI report developers, BI teams and anyone who already uses basic DAX and wants a deeper understanding of how calculations work. You should be able to build reports and data models in Power BI Desktop and write basic measures such as SUM, DIVIDE and simple CALCULATE. The course does not repeat data preparation or dashboard design.

Can the Advanced DAX in Power BI course be run in-house for our team?

Yes. It can be run in-house for your team, with examples adapted to your own work, such as reviewing measures in your own model that return wrong results or run slowly. You can request a quotation from this page, or contact us on LINE @itgenius or by phone on 02-570-8449.