Overview

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 like Total 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.
What is the Power BI semantic model, and why is it important?The semantic model defines tables, relationships, and business logic that give data analytical meaning. It powers consistent filtering, relationship-based navigation, reusable measures, and interactive calculations. Unlike Excel (which evaluates over visible cells), Power BI evaluates DAX over the semantic model; visuals show the final result of queries executed against that model.
Do I need to write joins in DAX, or do relationships handle that?You don’t write joins in DAX. Once relationships are defined in the model, DAX treats related tables as a unified structure. Joins become implicit, and filters propagate automatically along the relationship direction. This lets measures reference fields across related tables without explicit join logic.
What are expanded tables, and how do they help?Expanded tables are a logical view where DAX extends a base table with columns from related one-side tables (and upstream through many-to-one chains). This enables simple, readable expressions that can reference related attributes directly (for example, filtering Fact Sales by a Category column several relationships away) without explicit joins.
What is data lineage, and how does it affect filter propagation?Data lineage is metadata that tracks a column’s “home address” in the model. With lineage, DAX can trace a column to its source, understand relationship paths, and correctly propagate filters across indirect relationships. That’s why expressions like filtering Sales by Product Category work even when the tables are connected through multiple intermediate relationships.
What breaks lineage, and what goes wrong if it’s lost?Lineage can be lost when reshaping data in ways that drop source metadata—common examples include SELECTCOLUMNS with renamed outputs, and virtual tables created with functions like ADDCOLUMNS or SUMMARIZE that don’t preserve references. Losing lineage can cause unexpected filter behavior, incorrect totals, or blanks because the intermediate recordsets become disconnected from the model.
What are disconnected tables (or recordsets), and how can I use or reconnect them?Disconnected tables are intentional “islands” with no relationships, often used for parameters, what-if analysis, or slicers that drive measures without changing model filters. Inside measures, intermediate recordsets can also become disconnected if lineage is lost. You can capture user input with SELECTEDVALUE and explicitly reconnect (simulate relationships) with TREATAS to map those values back to model columns and restore filter propagation.

pro $24.99 per month

  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose one free eBook per month to keep
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime

lite $19.99 per month

  • access to all Manning books, including MEAPs!

team

5, 10 or 20 seats+ for your team - learn more


choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • DAX Reimagined ebook for free
choose your plan

team

monthly
annual
$49.99
$399.99
only $33.33 per month
  • five seats for your team
  • access to all Manning books, MEAPs, liveVideos, liveProjects, and audiobooks!
  • choose another free product every time you renew
  • choose twelve free products per year
  • exclusive 50% discount on all purchases
  • renews monthly, pause or cancel renewal anytime
  • renews annually, pause or cancel renewal anytime
  • DAX Reimagined ebook for free