Foundations First

What Is Row Context? How Is It Different From Filter Context?

Use the same sales table in two different ways. First, watch DAX focus on a single row. Then apply filters and see how the visible rows change for aggregation.

Mental Model

Row context = "Which single row am I currently evaluating?" Filter context = "Which rows are visible to my calculation right now?"

Row context points to one row. Filter context shrinks or expands the set of rows a measure can see.

Sales Table

Gold = row context, Green = filter context
Order Customer Region Category Amount

Difference in plain words

Foundation for context transition

Row Context

One row at a time

Created by calculated columns and iterator functions like SUMX, AVERAGEX, FILTER, and ADDCOLUMNS. It tells DAX which row it is currently standing on.

Filter Context

A set of visible rows

Created by slicers, filters, relationships, and CALCULATE(). It decides which rows a measure can see when computing an aggregation like SUM.

Example 1: Row context expression
Line Value = Sales[Quantity] * Sales[Unit Price]
This works because DAX evaluates the current row.

Example 2: Filter context measure
Total Sales = SUM(Sales[Amount])
This measure changes only when the visible set of rows changes.