OpenBI Docs Buy

FILTERS

The values filtering a column directly.

Group: Filter. Compatible with DAX.

Syntax

FILTERS ( <columnName> )
ParameterTypeDescription
columnNameColumnThe 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 VALUES but 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], ", " ).
  • ISFILTERED tells whether there is a direct filter at all; HASONEFILTER whether 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"
)
FILTERSVALUES
Cider, IPA, PilsIPA, 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"
)
FILTERSVALUES
43

VALUES, ISFILTERED, HASONEFILTER, SELECTEDVALUE, CONCATENATEX.

Last updated · OpenBI Studio 0.3.74