REMOVEFILTERS
As a filter of CALCULATE, removes the filters on tables or columns, or all of them.
Group: Filter. Compatible with DAX.
Syntax
REMOVEFILTERS ( <table> )
REMOVEFILTERS ( <column> [, <column>] … )
REMOVEFILTERS ( )
| Parameter | Type | Description |
|---|---|---|
table | Table | A table whose filters are all removed. |
column | Column repeatable | A column whose filter is removed; several must come from one table. |
Returns
Filter. No value of its own: it takes filters away from the CALCULATE or CALCULATETABLE it is in.
Remarks
- In
CALCULATEit does whatALLdoes there:REMOVEFILTERS ( Products )removes every filter on Products,REMOVEFILTERS ( Products[Product] )only that column's,REMOVEFILTERS ( )every filter in the model. - Its name says what happens, which makes a measure easier to read: ALL can also be a table of rows, REMOVEFILTERS only removes.
- Use it only as a filter of
CALCULATEorCALCULATETABLE. Where a table of rows is needed, use ALL. - Conditions in the same CALCULATE still apply, whatever their order:
CALCULATE ( [Liters sold], Products[Category] = "Cider", REMOVEFILTERS ( ) )is all the cider.
Examples
Each product's share of all liters
EVALUATE
SUMMARIZECOLUMNS (
Products[Product],
"Liters", [Liters sold],
"Share", DIVIDE ( [Liters sold], CALCULATE ( [Liters sold], REMOVEFILTERS ( Products ) ) )
)
ORDER BY Products[Product]
| Products[Product] | Liters | Share |
|---|---|---|
| Cider | 301074 | 0.166664913701526 |
| IPA | 331884 | 0.183720341905702 |
| Lettøl | 169179 | 0.0936520703717707 |
| Pils | 1004326 | 0.555962674021001 |
Every filter removed, then one condition
EVALUATE
CALCULATETABLE (
ROW (
"In Frogner", [Liters sold],
"Everywhere", CALCULATE ( [Liters sold], REMOVEFILTERS ( ) ),
"Cider everywhere", CALCULATE ( [Liters sold], Products[Category] = "Cider", REMOVEFILTERS ( ) )
),
Places[District] = "Frogner"
)
| In Frogner | Everywhere | Cider everywhere |
|---|---|---|
| 151920 | 1806463 | 301074 |