WMA Hub

Tools / DAX library

Remove a filter with REMOVEFILTERS

Calculate a value that ignores one table's filters, for example sales for all regions while one region is selected.

Filter context · Intermediate · Not yet reviewed

Sales (All Regions) =
CALCULATE([Total Sales], REMOVEFILTERS(Region))

How it works

CALCULATE changes the filter context before it evaluates its first argument. REMOVEFILTERS(Region) removes every filter that comes from the Region table, so the result is the same whatever region is selected.

This is the building block for "% of all regions" calculations and benchmarks.

What your model needs

- A Region table related to Sales. - Total Sales = SUM(Sales[Amount]) (called [Total Sales]).

Small example

Input data

Slicer: Region = North
North sales = 600, all regions = 1,000

Expected result

Total Sales = 600
Sales (All Regions) = 1,000

Common mistakes and limitations

- REMOVEFILTERS can only be used as a CALCULATE filter argument. Use ALL when you need a table value. - It removes slicer selections too, which is sometimes not what you want; ALLSELECTED keeps slicers.

Tags: REMOVEFILTERS, filter context, CALCULATE, ALL