Wrapping a CALCULATE or CALCULATETABLE filter argument in this DAX modifier stops it overriding filters already on those columns; instead only values satisfying both survive.
Read more: Microsoft Learn
In the Ultra Transcenders books
Each book explains KEEPFILTERS in context, with comparison tables and the common traps.
Terms in this definition
- 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.
- 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.
- FILTER
Returns just those rows of a table that meet a condition. In CALCULATE it handles conditions too complex for a Boolean filter argument, though a Boolean filter is faster whenever one will work.
- 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.
Related terms
- Boolean filter expression
A true/false condition such as
'Product'[Color] = "Blue"passed as a filter to CALCULATE or CALCULATETABLE. Only one table's columns may appear in it, measures and nested CALCULATE calls are not allowed, and it overrides an existing filter on that column unless you wrap it in KEEPFILTERS. - 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.