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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
jzeosky
New Member

Measure using REMOVEFILTER Behaves Unexpectedly

Hello,

I'm seeing some strange behavior with one of my measures that uses REMOVEFILTER. I'm not sure how to explain it clearly so here's a simple example I've setup that shows the behavior. I have a simple table with three columns:

 

jzeosky_1-1616774108653.png

 

Similarly I have 3 slicers that slice the data by each of the columns:

 

jzeosky_2-1616774156019.png

 

I want to calculate the percentage of the data that falls within the the FirstReview slicer range. So for example if Date is set to a range of 1-2 we'll have a total of 6 entries. If then FirstReview is set to 1-3, there are only 3 entries in that range. The calculated percentage should then be 50% (3 in FirstReview range out of a total of 6 from all other slicing).

 

I have 3 measures defined as follows:

 

ReviewStaticCount = CALCULATE(DISTINCTCOUNT(Sheet1[ID]), REMOVEFILTERS(Sheet1[FirstReview]))
FilteredIDCount = DISTINCTCOUNT(Sheet1[ID])
%ID = ([FilteredIDCount]/[ReviewStaticCount]) * 100
 
My expectation is that ReviewStaticCount should calculate the number of entries independent of the range set on the FirstReview slicer, but respecting all other slicers. FilteredIDCount should be the number of entries after all slicers are applied. %ID should then be the final percentage I want to calculate.
 
This seems to work if I only adjust the FirstReview slicer, see below:
jzeosky_3-1616774708530.png

 

However if I also adjust the Date slicer, the calculated percentage will change wildly with the selected range. Notice in the example below if I set Date to be 1-2 and FirstReview to be 1-4 the resulting percentage is calculated properly:

jzeosky_4-1616774839581.png

 

But if I change FirstReview to 1-3 ReviewStaticCount is no longer calculated properly (it ignores the values where Date=2) and the resulting percentage is incorrect (we would expect 50%).

jzeosky_5-1616774939421.png

Am I misunderstanding how REMOVEFILTER should behave in this context?

 

Thanks in advance for the help!

 

 

1 ACCEPTED SOLUTION
JW_van_Holst
Resolver IV
Resolver IV

This was a real tricky one. I don't think you misunderstand the REMOVEFILTER. The problem is that the slicer on FirstReviews cross filters the slicer on Date. So if your slicer on FirstReview is below 7 Data 3 will be cross filtered. You can overcome this problem bij creating a separate Data table with the distinct values and create a relationship with you table. Use the table with the distinct values as slicer. This will not be cross filtered by FirstReview because it is on the one side (no filter propagation).

Good Luck,

//JW

View solution in original post

2 REPLIES 2
JW_van_Holst
Resolver IV
Resolver IV

This was a real tricky one. I don't think you misunderstand the REMOVEFILTER. The problem is that the slicer on FirstReviews cross filters the slicer on Date. So if your slicer on FirstReview is below 7 Data 3 will be cross filtered. You can overcome this problem bij creating a separate Data table with the distinct values and create a relationship with you table. Use the table with the distinct values as slicer. This will not be cross filtered by FirstReview because it is on the one side (no filter propagation).

Good Luck,

//JW

I tried your solution and it worked! I can't say I really understand the concept of cross-filtering, but I can learn more about that on my own time. For the time being this is a workaround that I can live with.

 

Really appreciate the help!

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.