REMOVEFILTERS
Clears the filters on the tables or columns you name, or on the whole model when used with no arguments. Works only as a CALCULATE filter.
REMOVEFILTERS([<table> | <column> [, <column> ...]])Returns: Used inside CALCULATE or CALCULATETABLE. It is not a value or a table by itself.
What it does
REMOVEFILTERS removes filters inside a CALCULATE. Most people find it easier to read than ALL in a filter argument, because the name says what happens. Use it to get a grand total, a company-wide figure or the denominator of a percent. With no arguments, it clears every filter in the model, including the user's slicers.
Syntax and arguments
- table or column (optional, several allowed): the tables or columns whose filters are cleared.
- With no arguments, every filter in the model is cleared.
- It can be used only as a filter modifier inside
CALCULATEorCALCULATETABLE.
Example
A board pack shows each product line's gross margin next to the company's share of total margin.
Share of Company Margin =
DIVIDE (
[Gross Margin],
CALCULATE ( [Gross Margin], REMOVEFILTERS () )
)
The denominator ignores every filter, so it is the company total for all dates, stores and products. Each row shows its portion of that total. Be careful: this also ignores the date slicer, so a monthly view compares against the all-years total.
Example: a second use
Keep the store filter, but ignore the product category filter.
Sales for All Categories =
CALCULATE (
[Total Sales],
REMOVEFILTERS ( Product[ProductCategory] )
)
If a visual is filtered to a store and a category, this measure shows the store's sales across every category. It is a clear way to build a "total for this store" comparison beside a category line.
Things to watch
- With no arguments, REMOVEFILTERS also clears the user's slicers. Name the tables or columns when you want to keep some filters.
- It cannot stand alone as a table. Use
ALLif you need a table result. - Removing a filter on a dimension does not remove a filter on the fact table, and the reverse is also true.
- Check the total you get is one you can explain to the reader. A grand total that ignores the date slicer is often not what was intended.
In business terms
Shares of company totals, grand total denominators, "all regions" comparisons, and budget totals that should not change with a product selection. Month-end shares and "company level" reference figures usually depend on it.