Row context

In addition to filter context, several DAX functions such as FILTER() and SUMX() are iterators and execute their expressions per row of a given table. The set of rows to evaluate from this table is always defined by the filter context which was described earlier in this chapter. The expression parameter of iterating functions can aggregate the rows of a table or can invoke the filter context of the specific row being iterated via the CALCULATE() function or a measure reference.

Calculated DAX columns are used to illustrate row context. In the following screenshot, four calculated columns have been added to a Date table and reference the Weekday Sort column:

The row context in calculated columns

All four calculated columns simply ...

Get Mastering Microsoft Power BI now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.