Posts tagged #Intermediate DAX

Modern DAX in Power BI: UDFs, Window Functions, INFO & More (Part 4)

Video by: Reid Havens

DAX has shipped more new surface area since 2022 than in the five years before it, and most of that never made it into anyone's habits. Part 4 of the series covers the five additions that change how you actually write code, where each one earns its keep, and where it still falls short.

User-defined functions are the headline. Reusable, parameterized DAX stored as a model object, so the pattern you keep copying between six measures finally lives in one place. We build one, call it with and without default parameters, and get into the limitations that are still there in the current release.

From there it's window functions (OFFSET, INDEX, WINDOW, RANK, ROWNUMBER) for row-relative math that time intelligence can't reach, INFO functions for querying your own model metadata as a table, EVALUATEANDLOG for debugging without littering the model with temporary measures, and dynamic format strings that follow context instead of sitting fixed on the measure.

The last stretch runs through the smaller additions that still come up: TREATAS, GROUPBY, DETAILROWS, ERROR, and TOCSV/TOJSON. None of them need a section of their own, but skipping them leaves gaps.

RELATED CONTENT 🔗

DAX Foundations Guide (Series Part 1)
DAX Context Guide (Series Part 2)
DAX Patterns Guide (Series Part 3)
DAX Modern Guide (Series Part 4)

Posted on August 25, 2026 and filed under DAX, Analytic Endeavors.

Simplify Power BI DAX with Visual Calculations

Video by: Reid Havens

If you've ever written a running total in DAX, you know it's more work than it has any right to be. CALCULATE, FILTER, a column reference you have to get exactly right, and a quiet prayer that it behaves at the subtotal level. Visual calculations let you write RUNNINGSUM([Sales]) and get on with your day.

They're a calculation layer that lives inside the visual itself, working on the data that's already been aggregated rather than querying the whole model. That's also why they're often faster, sometimes dramatically so on DirectQuery.

I walk through the core functions (running totals, moving averages, PREVIOUS and NEXT for period comparisons, FIRST, LAST, INDEX, and RANK), then the hierarchy functions like COLLAPSE and EXPAND that make "% of parent" and "% of grand total" almost trivial. We also get into AXIS and RESET, which control the direction a calculation runs and where it restarts, because that's the part that quietly breaks people's running totals across years.

One honest caveat. Yes, they're easier and faster. But because each one only lives in a single visual, they can fragment your business logic across reports if you're not careful, so I cover when a visual calc is the right call and when it really should be a centralized measure.

DAX Fundamentals Part 3: The Patterns That Make Reports Work

You've learned how filter context and CALCULATE actually work. This is where it pays off. Part 3 of the DAX Fundamentals series covers the patterns you'll keep reaching for in real models, and why they behave the way they do.

We get into time intelligence (YTD, QTD, prior cycle, and why these functions return tables of dates rather than numbers), variables for cleaner and faster formulas, and SWITCH as the cure for nested IF chains nobody wants to maintain. Then inactive relationships and USERELATIONSHIP for when one fact table has two date columns fighting over the same date table.

The pattern that saves the most pain is calculation groups. Write three base measures, add one calc group with YTD, Prior Cycle, and YoY%, and you've replaced nine measures (and growing) with something you maintain in one place.

The video closes on the part most people skip: how the engine splits work between the Storage Engine and the Formula Engine, and why pushing work toward simple aggregations on a star schema is the difference between fast DAX and slow DAX.

Understand DAX Context in Power BI: CALCULATE, Filter Context & Row Context (Part 2)

Video by: Reid Havens

The single biggest concept separating DAX beginners from confident report builders is context. This interactive guide breaks down how Power BI evaluates every formula you write: what filter context is, how CALCULATE manipulates it, the difference between row context and filter context, how context transition bridges the two, and why iterator functions like SUMX create their own row context. If CALCULATE has ever confused you, start here.

Topics covered:

  • The mental model shift: why DAX doesn't think like Excel

  • Query context: how rows and columns shape evaluation

  • Filter context: slicers, relationships, and implicit filters

  • CALCULATE: overriding, replacing, and adding filter arguments

  • Row context: calculated columns, iterators, and the current row

  • Context transition: what happens when CALCULATE meets row context

  • Iterator functions: SUMX, AVERAGEX, and row-by-row evaluation

RELATED CONTENT 🔗

DAX Context (Part 2)
Analytic Endeavors