How would you explain row context and filter context using a sales report?

Instruction: Use a small sales, ticket, or inventory example you can explain. Describe it as a demonstration unless you actually built the report.

Context: Explains the two contexts through observable behavior and avoids confusing a visual row with an iterator's current row.

Updated

Example Answer

I'd use a sales report rather than start with definitions. Suppose each sales line has a quantity and unit price. A calculated column can multiply those values for the current line; that is row context. A SUMX measure also creates row context as it evaluates each eligible sales line.

Now suppose a matrix shows revenue by region, with a January slicer. Each cell has filter context from its region, the selected month, and the model's relationships. That context determines which sales lines the measure considers. The matrix's region row is a grouping filter; it does not automatically create DAX row context.

I'd demonstrate this with two regions and a few transactions, then change the slicer. The stored line amounts stay the same, while the measure recalculates for the selected transactions. That makes the difference visible.

Make it your own

Use a small sales, ticket, or inventory example you can explain. Describe it as a demonstration unless you actually built the report.

Why this works

Explains the two contexts through observable behavior and avoids confusing a visual row with an iterator's current row.

Interviewer follow-up

Why can a customer's calculated column show the same sales total for every customer?

I'd check whether the expression is aggregating Sales without converting the current customer row into a filter. CALCULATE can perform that context transition, provided the relationship is correct. Referencing an existing model measure in row context performs the transition automatically. I'd still prefer a measure if the result must respond to report selections.

References

Related Questions