Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
RobMills
New Member

Changes to how filtering works in DAX in last couple of days?

My question is about why the below has stopped working, and if it is a known issue or an expected change;

 

I have a complaints table that contains a primary reason column, containing either communication, delay, feedback or quality, and in the measures that count the rows of this table, I have included a filter in the DAX to remove feedback complaints from the count. Then in the reports, I/users can use the filter pane to apply another filter on the primary reason, eg to just show quality complaints, and this should update the measures to show just quality complaints. I built this measure over a year ago, and it has always worked fine, but it has started ignoring the additional filters from the filter pane;

 

The measure;

CALCULATE(  DISTINCTCOUNT('TBL_Retina_Complaints'[ComplaintId])
            ,'TBL_Retina_Complaints'[ComplaintPrimaryReason] <> "FEEDBACK"
            ,USERELATIONSHIP('Calendar'[Dates],'TBL_Retina_Complaints'[ComplaintCreatedDate]))
 
This does remove the feedback from the count, however when the primary reason is filtered further within the filter pane, the result of this measure doesn't change. Some screenshots to demonstrate;
 
Primary reason unfiltered, the left card is just the distinct count of complaint id straight from the table, the right card is the above measure;
RobMills_0-1772801438722.png
 
Primary reason filtered to remove feedback and delay, the left card is just the distinct count of complaint id straight from the table, the right card is the above measure;
RobMills_1-1772801529976.png

As you can see, the measure is ignoring the filter pane removing delay, as if the measure contained ALL([ComplaintPrimaryReason]) alongside the filter to remove feedback, but it has never worked this way before.

 

I have been able to resolve this issue by replacing the filter in the measure with KEEPFILTERS (new measure shown below), but I don't understand why this has stopped working. We maintain around 15 models feeding hundreds of different reports, and I really don't want to have to go through potentially 1000s of measures to find and replace these filters without understanding if this is a permanent and expected result of a change microsoft has done, or is a known issue that'll soon be fixed? I've had a look in the recent release notes and seemingly relevant posts but have been unable to find anything relating to this issue, any information on this would be hugely appreciated!

 

New measure for anyone with a similar issue;

CALCULATE(  DISTINCTCOUNT('TBL_Retina_Complaints'[ComplaintID])
            ,KEEPFILTERS('TBL_Retina_Complaints'[ComplaintPrimaryReason] <> "FEEDBACK")
            ,USERELATIONSHIP('Calendar'[Dates],'TBL_Retina_Complaints'[ComplaintCreatedDate]))
1 ACCEPTED SOLUTION
Zanqueta
Super User
Super User

Hi @RobMills

 

I am not entirely certain, but the behaviour you are seeing is consistent with how CALCULATE has always handled boolean filter expressions. What appears to have changed in the last few days is not the DAX engine itself, but rather the context in which your measure is now being evaluated. This often occurs after structural changes to the model, the addition of new categories, or modifications to related tables.

 

inside CALCULATE, Power BI treats it as a new filter that replaces any existing filter on the same column. Operationally, this is similar to:

 

CALCULATE(
...,
REMOVEFILTERS('TBL_Retina_Complaints'[ComplaintPrimaryReason]),
'TBL_Retina_Complaints'[ComplaintPrimaryReason] <> "FEEDBACK"
)

 

This means that filters applied in the filter pane on the same column are cleared and replaced by the filter defined inside the measure. This behaviour is documented and has not changed.
The reason your previous implementation “worked” is typically because the model context aligned in a way that allowed both filters to coincide. When column cardinality, filter types, relationships, or referenced tables change, the evaluation no longer behaves as before.
KEEPFILTERS resolves the issue because it explicitly instructs CALCULATE to retain any existing filters on the column and then apply the additional constraint:

 

KEEPFILTERS('TBL_Retina_Complaints'[ComplaintPrimaryReason] <> "FEEDBACK")

 

This achieves the behaviour you originally expected and is the recommended approach whenever model filters must be combined with manual filters inside a measure.

 

If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster.
Connect with me on LinkedIn

View solution in original post

1 REPLY 1
Zanqueta
Super User
Super User

Hi @RobMills

 

I am not entirely certain, but the behaviour you are seeing is consistent with how CALCULATE has always handled boolean filter expressions. What appears to have changed in the last few days is not the DAX engine itself, but rather the context in which your measure is now being evaluated. This often occurs after structural changes to the model, the addition of new categories, or modifications to related tables.

 

inside CALCULATE, Power BI treats it as a new filter that replaces any existing filter on the same column. Operationally, this is similar to:

 

CALCULATE(
...,
REMOVEFILTERS('TBL_Retina_Complaints'[ComplaintPrimaryReason]),
'TBL_Retina_Complaints'[ComplaintPrimaryReason] <> "FEEDBACK"
)

 

This means that filters applied in the filter pane on the same column are cleared and replaced by the filter defined inside the measure. This behaviour is documented and has not changed.
The reason your previous implementation “worked” is typically because the model context aligned in a way that allowed both filters to coincide. When column cardinality, filter types, relationships, or referenced tables change, the evaluation no longer behaves as before.
KEEPFILTERS resolves the issue because it explicitly instructs CALCULATE to retain any existing filters on the column and then apply the additional constraint:

 

KEEPFILTERS('TBL_Retina_Complaints'[ComplaintPrimaryReason] <> "FEEDBACK")

 

This achieves the behaviour you originally expected and is the recommended approach whenever model filters must be combined with manual filters inside a measure.

 

If this response was helpful in any way, I’d gladly accept a kudo.
Please mark it as the correct solution. It helps other community members find their way faster.
Connect with me on LinkedIn

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.