REMOVEFILTERS DAX Function (Filter)
Clear filters from the specified tables or columns.
Syntax
Parameter | Attributes | Description |
---|---|---|
TableNameOrColumnName | Optional |
The name of an existing table or column. |
ColumnName | Optional Repeatable |
A column in the same base table. |
Remarks
REMOVEFILTERS is an alias for ALL, but it can be used only as a CALCULATE modifier and not as a table expression like ALL .
» 1 related function
Examples
-- Filter Litware/Red EVALUATE CALCULATETABLE ( SUMMARIZE ( 'Product', 'Product'[Category], 'Product'[Brand], 'Product'[Color] ), Product[Brand] = "Litware", Product[Color] = "Red" ) -- Remove Red filter, as a result the filter is Litware only EVALUATE CALCULATETABLE ( CALCULATETABLE ( SUMMARIZE ( 'Product', 'Product'[Category], 'Product'[Brand], 'Product'[Color] ), REMOVEFILTERS ( 'Product'[Color] ) ), Product[Brand] = "Litware", Product[Color] = "Red" )
Category | Brand | Color |
---|---|---|
Home Appliances | Litware | Red |
Category | Brand | Color |
---|---|---|
TV and Video | Litware | Silver |
Home Appliances | Litware | Silver |
Home Appliances | Litware | Blue |
Home Appliances | Litware | White |
Home Appliances | Litware | Red |
TV and Video | Litware | Black |
Home Appliances | Litware | Black |
Home Appliances | Litware | Green |
Home Appliances | Litware | Orange |
Home Appliances | Litware | Pink |
Home Appliances | Litware | Yellow |
Home Appliances | Litware | Purple |
TV and Video | Litware | Brown |
Home Appliances | Litware | Brown |
Home Appliances | Litware | Grey |
-- Filter Litware/Red EVALUATE CALCULATETABLE ( SUMMARIZE ( 'Product', 'Product'[Category], 'Product'[Brand], 'Product'[Color] ), Product[Brand] = "Litware", Product[Color] = "Red" ) -- Remove all the filters from Product: as a result, both Litware and Red filters are removed EVALUATE CALCULATETABLE ( CALCULATETABLE ( SUMMARIZE ( 'Product', 'Product'[Category], 'Product'[Brand], 'Product'[Color] ), REMOVEFILTERS ( 'Product' ) ), Product[Brand] = "Litware", Product[Color] = "Red" )
Related articles
Learn more about REMOVEFILTERS in the following articles:
-
Managing “all” functions in DAX: ALL, ALLSELECTED, ALLNOBLANKROW, ALLEXCEPT
This article provides a complete explanation of the behavior of the ALLxxx functions in DAX. When used as filters in CALCULATE, ALLxxx functions might display unexpected behaviors. » Read more
-
Mark as Date table
Tabular models (including Power BI) require marking the Date table as a date table to get appropriate results with time intelligence calculations. This article explains why this setting is required. » Read more
-
USERELATIONSHIP in Calculated Columns
USERELATIONSHIP lets you temporarily change which relationship is active. Even though USERELATIONSHIP is easy to work with in measures, it can be challenging and give you inaccurate results when used in calculated columns. In this article we describe the details… » Read more
Related functions
Other related functions are:
Last update: Jun 10, 2023 » Contribute » Show contributors
Contributors: Alberto Ferrari, Marco Russo
Microsoft documentation: https://docs.microsoft.com/en-us/dax/removefilters-function-dax