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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
johnyip
Solution Sage
Solution Sage

Issues with selectable data range of a slicer

Hello all, I have an issue creating a slicer whose selectable values are dynamic based on the data selected.

 

As a brief introduction, the dashboard aims to display the sales figures of different companies based on the year and month (YYYYMM) selected. I deliberately make the sales of Company A and Company C identical for the date-month 202012 as the test case.

 

The Ranking slicer aims to confine the range of selectable values based on the rank of the data displayed by the dashboard. For example, in 202012, the slicer is supposed to allow users to slide from the values of 1 to 4 only (because two companies ranks the same).

 

The DAX I used to confine the values available in the Ranking slicer is as follows:

Ranking_SLICER FILTER =
VAR MinValue = MINX(ALLSELECTED(Sales[Company]),RANKX(ALLSELECTED(Sales[Company]),[Monthly Sales],,DESC,DENSE))
VAR MaxValue = MAXX(ALLSELECTED(Sales[Company]),RANKX(ALLSELECTED(Sales[Company]),[Monthly Sales],,DESC,DENSE))
VAR CurrentSlicerValue = SELECTEDVALUE('Ranking range'[Ranking])
RETURN
IF(CurrentSlicerValue >= MinValue && CurrentSlicerValue <= MaxValue,1,0)

 

 
The logic is totally perfect but it just fails to work.
 
Ironically, when I hardcode the selected date in [Monthly Sales] as 
CALCULATE(SUM(Sales[Sales]),Sales[Date]=202012), the Ranking filter can confine the values correctly, but the [Monthly Sales] is then not listened to the slicer, which is totally not preferred.
 
When I mean to make the [Monthly Sales] listen to the date slicer, I use this DAX: 
CALCULATE(SUM(Sales[Sales]),Sales[Date]=SELECTEDVALUE('Time filter'[Date])), but this renders the Ranking slicer confines the user to slide through the range of 1 to 1 only, failing to comply with the logic I defined.

 

So, is there any workaround for this issue? I tried using different tricks but it just won't work. I will be very glad if I can seek an answer here. Thanks a lot.

 

The download link of my file:

https://drive.google.com/file/d/1xh-rd9MYf4RqYrt6tDCfaQGSKzBhWaKB/view?usp=sharing



Please mark my post as the solution if this answers your question!
Appreciate your Kudos !!
1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @johnyip ,

 

This issue has been confirmed as a known issue internally. Internal ICM ID: 282363959

Please be patient to wait for fixing. If there is any news, I will update it here.

 

Best Regards,
Rico Zhou

 

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

View solution in original post

3 REPLIES 3
Anonymous
Not applicable

Hi @johnyip ,

 

Please try to click your Date slicer and then use Edit interaction function to change the interactions from None to Filter. Then rank slicer works.

1.png

Best Regards,
Rico Zhou

 

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

Anonymous
Not applicable

Hi @johnyip ,

 

This issue has been confirmed as a known issue internally. Internal ICM ID: 282363959

Please be patient to wait for fixing. If there is any news, I will update it here.

 

Best Regards,
Rico Zhou

 

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

Anonymous
Not applicable

Hi @johnyip ,

 

I think your measure is correct. I suggest you to use list kind slicer directly. There may be something wrong in Slicer between function. Or you can create two list kind slicer , one show min value you need and another one you select max value you need.

 

Best Regards,
Rico Zhou

 

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

 

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

Check out the July 2025 Power BI update to learn about new features.

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.