Whenever DAX evaluates an expression, each column is limited to certain values by slicers, report filters, a visual's rows and columns, relationships and any filters coded in formulas. Measures always calculate under these limits; row context, by contrast, means the current row.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains Filter context in context, with comparison tables and the common traps.
Terms in this definition
- DAX
Short for Data Analysis Expressions, the formula language you write measures, calculated columns and row-level security rules in, within tabular semantic models in Power BI, Excel Power Pivot or Analysis Services.
- VALUES
Returns in DAX the distinct column values, or table rows, still visible after filters are applied, sometimes with an extra blank entry. CALCULATE often takes the result as a table filter.
- CALCULATE
A DAX function that computes an expression after changing the filter context with filter modifiers, Boolean filters or table filters. Called with no filters, it still turns any row context into filter context, which is known as context transition.
- Row context
Exists automatically in calculated columns and inside iterators like SUMX, giving DAX a current row to work on. Filtering the model is left to filter context; a current row does not do that by itself.
Related terms
- CALCULATETABLE
Works like CALCULATE but returns a table: a table expression is evaluated under a modified filter context, with filter arguments behaving exactly as they do for CALCULATE.
- context transition
What CALCULATE does to row context: it converts it into an equivalent filter context. You need it for aggregating expressions inside iterators or calculated columns, and referring to a model measure triggers it implicitly.
- DATEADD
Shifts the set of dates in the current filter context by a given number of years, quarters, months or days, earlier or later. Prior-year comparisons are a typical use of this DAX time intelligence function.
- Filter modifier functions
Rather than adding a filter, these DAX functions change the existing filter context when passed to CALCULATE or CALCULATETABLE. The group covers REMOVEFILTERS, ALL and its variants, KEEPFILTERS, USERELATIONSHIP and CROSSFILTER.
- FIRSTNONBLANK
A DAX function that scans a column within the current filter context and gives back the earliest value where a given expression produces something other than blank. Its partner, LASTNONBLANK, is the usual choice for closing balances.
- SELECTEDVALUE
Returns the single value of a column when the filter context leaves only one distinct value; in any other case it gives an alternative result, which is BLANK unless you supply one.