Microsoft Certified: Power BI Data Analyst AssociateModel the dataEasy

A data modeler is designing a Power BI model for a manufacturing plant. The model needs to track the 'Total Production Quantity' for each product. The production data is stored in a 'Production' table with 'ProductID' and 'Quantity' columns. The 'Products' table has 'ProductID' and 'ProductName'. The modeler chooses to create a simple measure `Total Production Quantity = SUM(Production[Quantity])`. After deployment, a user creates a table visual that displays 'ProductName' and the new 'Total Production Quantity' measure. What is the filter context for the 'Total Production Quantity' measure when evaluated for a specific 'ProductName' in this visual?

  1. AThe measure is evaluated in a context transition, converting 'ProductName' from row context to filter context.
  2. BThe measure is evaluated in a global filter context, ignoring the 'ProductName' in the visual.
  3. CThe measure is evaluated in a row context for each 'ProductName', then summed.
  4. DThe measure is evaluated in a filter context where 'ProductName' is filtered to the current product in the visual.
Show answer & explanation

Correct answer: D. The measure is evaluated in a filter context where 'ProductName' is filtered to the current product in the visual.

When a measure is placed in a visual alongside a column (like 'ProductName'), the visual automatically creates a filter context for each row of that column. So, for each 'ProductName' displayed, the 'Total Production Quantity' measure is calculated with a filter applied to the 'Products' table (which then propagates to 'Production') for that specific product.

Why the other options are wrong

  • A. Context transition happens when a measure is evaluated within a row context (e.g., inside an X-function or a calculated column). Here, the 'ProductName' is coming from a visual, which establishes a filter context directly, not a row context that needs transition.
  • B. A measure placed in a visual always respects the filters applied by that visual's grouping columns or slicers. It does not ignore them and operate in a global context unless explicitly told to do so (e.g., with ALL).
  • C. Measures are evaluated in filter context, not row context, by default when placed in a visual. Row context is created by iterators or calculated columns.

Filter Context from Visuals

When a measure is used in a Power BI visual alongside dimension columns, the visual automatically establishes a filter context for each combination of those dimension values. The measure is then evaluated within this specific filter context.

  • Visuals create filter contexts implicitly.
  • Each row/cell in a visual has its own filter context.
  • Measures respond dynamically to these contexts.

Memory trick: A visual is like a spotlight, shining on a specific part of your data.

More Model the data questions