ISFILTERED
Whether a column, or any column of a table, is filtered directly.
Group: Information. Compatible with DAX.
Syntax
ISFILTERED ( <TableNameOrColumnName> )
| Parameter | Type | Description |
|---|---|---|
TableNameOrColumnName | Table or column | A column, or a table: a table is filtered when any of its columns is. |
Returns
Boolean. TRUE when a filter is set on the column itself, FALSE otherwise.
Remarks
- Only direct filters count: a slicer or a visual's grouping on the column, a
CALCULATEfilter on it, or a filter over its whole table. A filter on a neighbouring column that merely narrows its values does not:ISCROSSFILTEREDsees those. - A row context is not a filter: inside
ADDCOLUMNSorFILTERit is FALSE untilCALCULATEturns the row into a filter. - A filter that
ALLorREMOVEFILTERSremoves no longer counts. - TRUE says that something filters the column, not how many values are left: it can be TRUE with several values picked, and FALSE when only one value exists. Use
HASONEVALUEfor that, andISINSCOPEto know whether a visual groups by the column.
Examples
Grouped by product, with a total
Each product's row filters the product column, and so its table; the category column is not filtered directly. The total row has no filter.
EVALUATE
SUMMARIZECOLUMNS (
ROLLUPADDISSUBTOTAL ( Products[Product], "Total" ),
"Product filtered", ISFILTERED ( Products[Product] ),
"Category filtered", ISFILTERED ( Products[Category] ),
"Products filtered", ISFILTERED ( Products )
)
ORDER BY [Total], Products[Product]
| Products[Product] | Total | Product filtered | Category filtered | Products filtered |
|---|---|---|---|---|
| Cider | FALSE | TRUE | FALSE | TRUE |
| IPA | FALSE | TRUE | FALSE | TRUE |
| Lettøl | FALSE | TRUE | FALSE | TRUE |
| Pils | FALSE | TRUE | FALSE | TRUE |
| (blank) | TRUE | FALSE | FALSE | FALSE |
A row context is not a filter
EVALUATE
ADDCOLUMNS (
VALUES ( Products[Product] ),
"In the row", ISFILTERED ( Products[Product] ),
"After CALCULATE", CALCULATE ( ISFILTERED ( Products[Product] ) )
)
ORDER BY Products[Product]
| Products[Product] | In the row | After CALCULATE |
|---|---|---|
| Cider | FALSE | TRUE |
| IPA | FALSE | TRUE |
| Lettøl | FALSE | TRUE |
| Pils | FALSE | TRUE |
Related functions
ISCROSSFILTERED, ISINSCOPE, HASONEFILTER, FILTERS, ALLSELECTED.