Don't miss your chance to take the Fabric Data Engineer (DP-600) exam for FREE! Find out how by attending the DP-600 session on April 23rd (pacific time), live or on-demand.
Learn moreNext 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
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;
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;
Solved! Go to Solution.
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
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
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 7 | |
| 6 | |
| 3 | |
| 2 | |
| 2 |
| User | Count |
|---|---|
| 21 | |
| 12 | |
| 9 | |
| 5 | |
| 5 |