ISFILTERED DAX Function (Information)

Returns true when there are direct filters on the specified column.

Syntax

ISFILTERED ( <TableNameOrColumnName> )
Parameter Attributes Description
TableNameOrColumnName

The table or column to check the filter info.

Return values

Scalar A single boolean value.

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.

» 3 related articles
» 2 related functions

Examples

--  ISFILTERED checks whether a column has a direct filter
--  ISCROSSFILTERED checks whether a column has either a direct
--  or an indirect filter (which is a filter propagated from a related column)
--
--  In this example we place the filter on the 1 side of a 1:* relationship
EVALUATE
CALCULATETABLE (
    {
        ( "ISFILTERED Product[Color]",          ISFILTERED ( Product[Color] ) ),
        ( "ISFILTERED Sales[Quantity]",         ISFILTERED ( Sales[Quantity] ) ),
        ( "ISCROSSFILTERED Product[Category]",  ISCROSSFILTERED ( Product[Category] ) ),
        ( "ISCROSSFILTERED Product",            ISCROSSFILTERED ( Product ) ),
        ( "ISCROSSFILTERED Sales",              ISCROSSFILTERED ( Sales ) )
    },
    'Product'[Color] = "Red"
)
Value1 Value2
ISFILTERED Product[Color] true
ISFILTERED Sales[Quantity] false
ISCROSSFILTERED Product[Category] true
ISCROSSFILTERED Product true
ISCROSSFILTERED Sales true
--  ISFILTERED checks whether a column has a direct filter
--  ISCROSSFILTERED checks whether a column has either a direct
--  or an indirect filter (which is a filter propagated from a related column)
--
--  In this example we place the filter on the many side of a 1:* relationship
EVALUATE
CALCULATETABLE (
    {
        ( "ISFILTERED Sales[Quantity]",         ISFILTERED ( Sales[Quantity] ) ),
        ( "ISFILTERED Product[Color]",          ISFILTERED ( Product[Color] ) ),
        ( "ISCROSSFILTERED Sales",              ISCROSSFILTERED ( Sales ) ),
        ( "ISCROSSFILTERED Product[Category]",  ISCROSSFILTERED ( Product[Category] ) ),
        ( "ISCROSSFILTERED Product",            ISCROSSFILTERED ( Product ) )
    },
    Sales[Quantity] = 1
)
Value1 Value2
ISFILTERED Sales[Quantity] true
ISFILTERED Product[Color] false
ISCROSSFILTERED Sales true
ISCROSSFILTERED Product[Category] false
ISCROSSFILTERED Product false
--  ISFILTERED checks whether a column has a direct filter
--  ISCROSSFILTERED checks whether a column has either a direct
--  or an indirect filter (which is a filter propagated from a related column)
--
--  In this example we place the filter on the many side of a 1:* relationship
--  enabling bidirectional cross-filter
EVALUATE
CALCULATETABLE (
    {
        ( "ISFILTERED Sales[Quantity]",         ISFILTERED ( Sales[Quantity] ) ),
        ( "ISFILTERED Product[Color]",          ISFILTERED ( Product[Color] ) ),
        ( "ISCROSSFILTERED Sales",              ISCROSSFILTERED ( Sales ) ),
        ( "ISCROSSFILTERED Product[Category]",  ISCROSSFILTERED ( Product[Category] ) ),
        ( "ISCROSSFILTERED Product",            ISCROSSFILTERED ( Product ) )
    },
    Sales[Quantity] = 1,
    CROSSFILTER ( Sales[ProductKey], 'Product'[ProductKey], BOTH ) 
)
Value1 Value2
ISFILTERED Sales[Quantity] true
ISFILTERED Product[Color] false
ISCROSSFILTERED Sales true
ISCROSSFILTERED Product[Category] true
ISCROSSFILTERED Product true
-- 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:

Related functions

Other related functions are:

Last update: Nov 14, 2024   » Contribute   » Show contributors

Contributors: Alberto Ferrari, Marco Russo

Microsoft documentation: https://docs.microsoft.com/en-us/dax/isfiltered-function-dax

2018-2024 © SQLBI. All rights are reserved. Information coming from Microsoft documentation is property of Microsoft Corp. » Contact us   » Privacy Policy & Cookies

Context Transition

This function performs a Context Transition if called in a Row Context. Click to read more.

Row Context

This expression is executed in a Row Context. Click to read more.

Iterator

Not recommended

The use of this function is not recommended. See Remarks and Related functions for alternatives.

Not recommended

The use of this parameter is not recommended.

Deprecated

This function is deprecated. Jump to the Alternatives section to see the function to use.

Volatile

A volatile function may return a different result every time you call it, even if you provide the same arguments. Click to read more.

Deprecated

This parameter is deprecated and its use is not recommended.

DirectQuery compatibility

Limitations are placed on DAX expressions allowed in measures and calculated columns.
The state below shows the DirectQuery compatibility of the DAX function.

Contribute

Want to improve the content of ISFILTERED? Did you find any issue?
Please, report it us! All submissions will be evaluated for possible updates of the content.


This site is protected by reCAPTCHA and the Google Privacy Policy and Terms of Service apply.