1 Interactive DAX and semantic model concepts
This chapter reframes DAX as an interactive, context-driven language that responds continuously to user actions in Power BI. It explains that every calculation runs within an evaluation context shaped by three forces: DAX functions that modify filters, the semantic model’s structure and relationships, and user interactions through visuals, slicers, and filters. The chapter contrasts Interactive DAX (measures evaluated on the report canvas) with Standard DAX (standalone queries for learning, testing, and debugging), and shows how Power BI silently injects filter context—often via an implicit CALCULATE—so results reflect the current state of the report. The goal is to move from static formula thinking to model-aware, filter-first design.
Through practical scenarios, the chapter shows how slicer choices, visual selections, and cross-filtering constantly reshape context, driving measure behavior at a per-cell granularity (for example, each matrix row). Behind the scenes, CALCULATE accumulates and merges all active filters before evaluating expressions, which is why simple measures can behave unexpectedly if you don’t account for the model and user inputs. Authors are encouraged to decide deliberately which filters to preserve, ignore, or override, and to use interaction management techniques to make logic intentional rather than incidental. Mastery involves tracing which filters are active, understanding how they propagate, and controlling them so results align with business rules.
The chapter then grounds interactivity in core semantic model concepts: relationships that unify tables, expanded tables that let DAX traverse related attributes without explicit joins, and data lineage that tracks column origins and valid filter paths. It warns that lineage can be broken—especially with virtual tables or column reshaping—producing disconnected recordsets that no longer participate in automatic filter behavior. In complex models with multiple fact tables, shared dimensions, and intentionally disconnected entities, reliability depends on knowing how filters flow and when to reestablish connections using functions such as TREATAS or by capturing user input via SELECTEDVALUE and related patterns. The overarching message: robust DAX emerges from a deep understanding of the semantic model, careful stewardship of filter context, and intentional use of interactivity.
A Power BI report with matrix visual and slicer and filter panes.
 
Visual flow, from user interaction to execution of DAX in a specific context.
 
Physical model relationships and various components of a semantic model.
 
Relationship setup and navigating an expanded table
 
An illustration of a semantic model in interactive mode showing both connected (fact, dimension) entities and disconnected entities.
 
Summary
- Every DAX calculation is context-driven—shaped by a combination of user interactions and semantic model relationships.
 - The semantic model enables automatic filter propagation across related tables, eliminating the need for explicit joins.
 - Expanded tables allow DAX to seamlessly access related dimension data without manual navigation.
 - Preserving data lineage is critical to ensuring filters propagate correctly through virtual tables and intermediate logic.
 - Disconnected tables are intentional design tools—used for scenarios like what-if analysis—and can be selectively reconnected using functions like TREATAS().
 
FAQ
What is Interactive DAX, and how is it different from Standard DAX?
Interactive DAX runs inside a Power BI report where slicers, visuals, and filters continuously shape the evaluation context. Standard DAX runs as standalone queries (for example, in DAX Studio or Query View) with a fixed, controlled context. Use Interactive DAX for live report behavior and Standard DAX for learning, debugging, and validating results without user-driven interference.What is evaluation context in DAX?
Evaluation context is the set of conditions that determine what data is visible when a DAX expression runs. It’s shaped by: (1) DAX functions that add/override/remove filters (for example, CALCULATE, REMOVEFILTERS), (2) the semantic model’s structure (relationships, filter propagation, expanded tables, data lineage), and (3) user interactions (slicers, visuals, cross-filtering). It ultimately defines which rows are included, which dimensions are visible, and how filters propagate.How do slicers, visuals, and filters change my measure results?
User actions silently inject filters into the context for every evaluation of a measure. For example, a simple measure likeTotal Sales := SUM(Sales[SalesAmount]) is reevaluated per slicer, filter pane, and visual selection. Behind the scenes, the engine applies those filters to the model before computing the result for each cell (for example, by year, category, and region).Why do measures behave as if they’re wrapped in CALCULATE?
Power BI implicitly wraps measure evaluations in CALCULATE to gather all active filters (from slicers, visuals, filter pane) into one filter context before evaluation. Conceptually, your measure runs like:Total Sales :=
CALCULATE(
    SUM(Sales[SalesAmount]),
    Product[Category] = "Bikes",
    Date[Year] = 2024,
    SalesTerritory[Region] = [Current Row]
)Even if you didn’t write CALCULATE, this implicit step is what enables interactive behavior.
                                    DAX Reimagined ebook for free