FILTERS
The values filtering a column directly.
Group: Filter. Compatible with DAX.
Syntax
FILTERS ( <columnName> )
| Parameter | Type | Description |
|---|---|---|
columnName | Column | The column whose direct filter is wanted. |
Returns
Table. The values the filters on the column itself allow; every value when none filters it.
Remarks
- Only filters set on the column itself count. A filter on another column of its table, or one that arrives through a relationship, narrows
VALUESbut not FILTERS. - When nothing filters the column directly, every value of the column comes back.
- It suits a title that repeats what the reader picked:
CONCATENATEX ( FILTERS ( Products[Product] ), Products[Product], ", " ). ISFILTEREDtells whether there is a direct filter at all;HASONEFILTERwhether it allows one value.
Examples
What was picked, and what is left
Pils, IPA and Cider are picked; the category filter then leaves only the beers among them.
EVALUATE
CALCULATETABLE (
ROW (
"FILTERS", CONCATENATEX ( FILTERS ( Products[Product] ), Products[Product], ", ", Products[Product], ASC ),
"VALUES", CONCATENATEX ( VALUES ( Products[Product] ), Products[Product], ", ", Products[Product], ASC )
),
Products[Product] = "Pils" || Products[Product] = "IPA" || Products[Product] = "Cider",
Products[Category] = "Beer"
)
| FILTERS | VALUES |
|---|---|
| Cider, IPA, Pils | IPA, Pils |
No direct filter
Only the category is filtered, so FILTERS has all four products.
EVALUATE
CALCULATETABLE (
ROW (
"FILTERS", COUNTROWS ( FILTERS ( Products[Product] ) ),
"VALUES", COUNTROWS ( VALUES ( Products[Product] ) )
),
Products[Category] = "Beer"
)
| FILTERS | VALUES |
|---|---|
| 4 | 3 |
Related functions
VALUES, ISFILTERED, HASONEFILTER, SELECTEDVALUE, CONCATENATEX.