ISFILTERED DAX Function (Information)
Returns true when there are direct filters on the specified column.
Syntax
Parameter | Attributes | Description |
---|---|---|
TableNameOrColumnName |
The table or column to check the filter info. |
Return values
TRUE when ColumnName is being filtered directly, or when any column of TableName is being filtered directly.
Remarks
A column is said to be filtered directly when the filter or filters apply over the column.
A column or table is said to be cross-filtered when a filter is applied to any column of the same table or in a related table.
ISFILTERED can check whether a column is being filtered directly or if any of the columns of the table is being filtered directly.
ISFILTERED supports a table argument since SSAS 2019 or Power BI April 2019. Former versions only support the column name argument.
Examples
-- These queries return FALSE EVALUATE { CALCULATE ( ISFILTERED ( Sales ), 'Product'[Color] = "Red" ) } EVALUATE { CALCULATE ( ISFILTERED ( Sales[Quantity] ), 'Product'[Color] = "Red" ) } EVALUATE { CALCULATE ( ISFILTERED ( Sales[Quantity] ), Sales[Unit Price] > 10 ) } --These queries return TRUE EVALUATE { CALCULATE ( ISFILTERED ( Sales ), Sales[Unit Price] > 10 ) } EVALUATE { CALCULATE ( ISFILTERED ( Sales[Unit Price] ), Sales[Unit Price] > 10 ) }
Related articles
Learn more about ISFILTERED in the following articles:
-
Side effects of the Sort By Column setting in DAX
The Sort By Column feature in Power BI causes side effects that are important to know when writing a DAX formula. This article explains these side effects and how to write correct DAX code to avoid getting incorrect results. » Read more
-
Displaying filter context in Power BI Tooltips
This article describes how to display the filter context applied to a calculation using a special DAX measure in Power BI Tooltips. » Read more
Related functions
Other related functions are:
Last update: Jan 23, 2021 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
MSDN documentation: https://docs.microsoft.com/en-us/dax/isfiltered-function-dax