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