Ever built a calculation in Power BI and suddenly noticed that a filter ruined everything? Filters are great… until they aren't. If you want to ignore certain filters (with class and elegance), REMOVEFILTERS can be your best friend.
But be careful! Just like muting the family group chat, removing filters can be liberating… or disastrous. So let's see how this function works and why it can be so useful!
What is REMOVEFILTERS and what does it actually do?
REMOVEFILTERS basically walks into Power BI and says: "See those filters over there? Ignore all of them."
It removes filters from one or more columns, or even from an entire table. It doesn't change the structure of your data, it only disregards the filters applied in the context of a measure.
How do you write it in DAX?
REMOVEFILTERS([<table>|<column>[, <column> [, <column> [, …]]]])
- If you pass a table, it ignores all the filters on that table.
- If you pass a specific column, it removes only the filters on that column.
- If you pass nothing… it removes EVERYTHING. Yes, everything. Be careful!
Examples in practice
1. The classic "I want total sales regardless of region"
Imagine a sales table (F_Sales) with Date, Product, Region and SalesAmount.
🔹 Without REMOVEFILTERS (the sum obeys the normal filters):
Total_Sales := SUM(F_Sales[SalesAmount])
If the user filters a single region, they only see the sales for that region.
🔹 With REMOVEFILTERS (completely ignoring the region filter):
Total_Sales_All_Regions =
CALCULATE(
SUM(F_Sales[SalesAmount]),
REMOVEFILTERS(F_Sales[Region])
)
Now the measure solemnly ignores any region filter and shows the overall sales total.
2. An example with two columns: the famous "Not you, not you either"
Suppose you want a sales total that ignores any filter someone tries to apply on Product and Region.
💡 Here is your anti-filter shield:
Total_Without_Product_Region =
CALCULATE(
SUM(F_Sales[SalesAmount]),
REMOVEFILTERS(F_Sales[Product], F_Sales[Region])
)
🔹 What happens? Even if the user tries to filter a single product or region, this measure looks at them and says: "Aww, how cute... but I'm going to ignore that, okay?"
Result: it always calculates the overall sales total, regardless of Product or Region.
3. The "I'm unstoppable": removing every filter on the table
If you want the sum to ignore any filter applied to the whole table, use:
Grand_Total =
CALCULATE(
SUM(F_Sales[SalesAmount]),
REMOVEFILTERS(F_Sales)
)
This can be useful to calculate, for example, the share a specific value represents of total sales.
4. No column at all: the "Everybody out"
Now, what if you want to wipe out every existing filter and calculate the overall sales total as if nobody had filtered anything?
💣 Simple: fire REMOVEFILTERS without mercy!
Grand_Total =
CALCULATE(
SUM(F_Sales[SalesAmount]),
REMOVEFILTERS()
)
🔹 What happens? This is the equivalent of wiping the whole whiteboard: no filter, on anything, anywhere, survives!
If the user filters by year, city, category, day of the week... it doesn't matter, this measure always returns the overall total.
⚠️ Careful! This can be a disaster if someone wanted to see just a slice of the data. If you only meant to ignore some filters and keep others, ALLEXCEPT may be a better friend (the kind that still follows some rules).
Best practices and pitfalls (or "How not to get burned using REMOVEFILTERS")
✅ Use REMOVEFILTERS sparingly. It is great, but removing filters left and right can make your report look broken.
✅ Combine it with other functions. REMOVEFILTERS works very well with CALCULATE, ALL, ALLEXCEPT, among others.
🚨 Mind the impact on users. If report users expect filters to work and, out of nowhere, your measures ignore them, confusion follows. Make it very clear when and why filters are being removed.
Conclusion
REMOVEFILTERS can save your report when used well, but it can also become a nightmare if applied without criteria, so be very careful when using it.