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

Get certified in Microsoft Fabric—for free! For a limited time, get a free DP-600 exam voucher to use by the end of 2024. Register now

Reply
nbs33
Helper II
Helper II

Filter Measure Not Working Properly

Hi,

I have created a measure that uses a parameter to filter a matrix. Here is the orginal post were I got the help to create this measure.

There is also a simplified model in the post that functions perfectly.

 

When I apply this measure to my model it does not work and I can't seem to figure out why. Without a year selected it will filter but not correctly. As can be see in the image below, the slicer max value is 64.09% but the matrix shows values of 65.19%. Even more strange when a year is selected it doesn't filter at all. 

I thought it might be related to the blank in my year slicer. I tried to remove this blank by removeing all blank dates in tables related to my date table but the blank remains. Other than that I am not sure what to do.

 

I am truely stuck. My hypothsis at this point is that there is some complexity in my model that is causing this issue. Any ideas are greatly appreciated. 

 

No Year Selected:                                                                          Year Selected:

nbs33_0-1644694225933.png

        nbs33_1-1644694287060.png

 

 

Filter Measure: 

 

InSelectedRange = 
VAR Level1Growth =
    CALCULATE (
        [YTD vs PYTD Revenue %],
        ALLSELECTED (),
        VALUES ( Companies[Level 1] ),
        VALUES(  Dates[Year] )
)
VAR RangeBuckets =
    FILTER (
        Range,
        Range[Range] <= Level1Growth
            && ( Range[Range] = 1
            || Range[Range] + 0.1 > Level1Growth )
        )
RETURN
    IF ( ISEMPTY ( RangeBuckets ), 0, 1 )

 

 

1 ACCEPTED SOLUTION

Thank you @v-yiruan-msft, I just figure it out. my measure was computing the range value in 10% increments which is why I was getting strange values. I just changed the slicer to a drop down so the selection will bucket the results in these 10% increments and make more sense to the user. 

View solution in original post

3 REPLIES 3
v-yiruan-msft
Community Support
Community Support

Hi @nbs33 ,

Could you please share your sample pbix file with latest version with us in order to make troubleshooting and provide you a suitable solution? Which field be used on the Range Slicer? Or it is from what-if parameter?

yingyinr_1-1644893485301.png

Best Regards

Community Support Team _ Rena
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Thank you @v-yiruan-msft, I just figure it out. my measure was computing the range value in 10% increments which is why I was getting strange values. I just changed the slicer to a drop down so the selection will bucket the results in these 10% increments and make more sense to the user. 

nbs33
Helper II
Helper II

I deleted the relationship between my date table and my Append CRM Data table and the my measure filters when a year is selected. I think this is related to an overly complex data model. 

 

But I'm still not sure why my matrix is returning values slightly greater than my max threshold value in my range slicer.

 

nbs33_1-1644696478779.png

 

 

Helpful resources

Announcements
November Carousel

Fabric Community Update - November 2024

Find out what's new and trending in the Fabric Community.

Live Sessions with Fabric DB

Be one of the first to start using Fabric Databases

Starting December 3, join live sessions with database experts and the Fabric product team to learn just how easy it is to get started.

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! Early Bird pricing ends December 9th.

Nov PBI Update Carousel

Power BI Monthly Update - November 2024

Check out the November 2024 Power BI update to learn about new features.