New Skill Forged: DAX Mastery
New Skill Forged
The Definitive Guide to DAX, 2nd Edition by Alberto Ferrari and Marco Russo. 738 pages. The only DAX book that treats DAX as a language worth understanding rather than a collection of functions to memorize.
Most people use DAX wrong for years before they understand why. They write SUMX(Table, [Measure]) and it’s slow. They put a measure in a calculated column and get unexpected results. They add a bidirectional relationship and watch filters do strange things across the model. Ferrari and Russo explain why — the evaluation context model, the VertiPaq storage engine, the formula engine vs. storage engine split — and once you understand the mechanics, the behavior stops being mysterious.
What this skill teaches Claude to do:
- Explain evaluation contexts without hand-waving: filter context (what slicers and row/column headers impose) vs. row context (what iterators create), and the critical concept of context transition — what happens when a measure is called inside a row context, why it happens, and how to avoid accidental performance traps
- Write CALCULATE correctly: understand that filter arguments override (not add to) existing filters by default, when to use FILTER(ALL(…)) vs. boolean filters vs. KEEPFILTERS, and what each CALCULATE modifier (ALL, ALLEXCEPT, USERELATIONSHIP, CROSSFILTER) actually does to the filter context
- Build the full time intelligence toolkit: DATESYTD, SAMEPERIODLASTYEAR, DATESINPERIOD, rolling averages — and understand the prerequisites (a proper Date table, no gaps, marked as Date table)
- Use variables correctly: understand that VAR captures the filter context at the point of definition — a common source of bugs when people expect variables to re-evaluate
- Design star schemas: fact tables are wide and have many rows; dimension tables are narrow and small; relationships flow from dimension to fact; bidirectionality is a last resort
- Debug DAX systematically: use EVALUATE in DAX Studio, check what’s actually filtering with ISFILTERED/ISCROSSFILTERED, profile with Server Timings to find formula engine vs. storage engine bottlenecks
The concept that unlocks everything:
Filter context modification is CALCULATE’s entire job. Every other time intelligence function, every percentage-of-total pattern, every conditional aggregation — it’s all CALCULATE modifying the filter context in a specific, predictable way. Once you see this, DAX goes from magic to mechanics.
The performance mental model:
VertiPaq (the storage engine) is your friend — it’s parallel, cached, and fast. The formula engine is your bottleneck — it’s single-threaded and uncached. Every complex DAX expression is a negotiation between these two. Write DAX that does more work in the storage engine, less in the formula engine. Avoid context transition in large calculated columns. Use variables. Prefer column-level operations in iterators over measure calls.
Browse the full skill at /skills/dax-definitive-guide
Forged from 4,939 books. This is #4 of the series.