REMOVEFILTERS

The REMOVEFILTERS function returns all the rows in a table or all the values in one or more columns, ignoring any filters that have been applied.

Syntax

REMOVEFILTERS(
   table
)

REMOVEFILTERS(
    column
    [, column[, ...]]
)

Parameters
  • table: Name of the table for which you want to remove the filters applied.
  • column: Name of the columns for which you want to remove the filters that have been applied.
Returned value

The REMOVEFILTERS function does not return any results.

Additional Information

REMOVEFILTERS is an alias for the ALL function. However, unlike this, REMOVEFILTERS can only be used as an argument to CALCULATE .

Examples

Suppose we have in our report -among other visualizations- a slicer by country, and suppose we also want to include a card-type visualization that shows the total sales (the absolute total, without considering any filter). For this card we create a measure that simply adds the Amount field that contains the amount of each sale:

Total Sales = SUM(Sales [Amount])

The visualizations -if we do not select any country in the slicer and assuming that no other filter is being applied- show the following aspect:

Función REMOVEFILTERS

Now, if a selection is made in the slicer, by default our total sales figure will be contextualized -which, as mentioned, is not what we want-:

Función REMOVEFILTERS

To avoid this contextualization, we can use the CALCULATE function to eliminate all existing filters by adding the REMOVEFILTERS function as an argument:

Total Sales = CALCULATE(SUM(Sales[Amount]), REMOVEFILTERS(Geography))

Now, the expression SUM(Sales[Amount]) will be calculated for all the rows of the Geography table regardless of the selection we make in the slicer:

Función REMOVEFILTERS
Category
Filter
Submitted by admin on Sat, 09/14/2019 - 10:17