Forum Discussion
Slicer for dynamic Indes
- 6 years ago
Here are more details
1. Make a What If Parameter (you've already done that for your Rank slicer
2. Make a measure like this one (using your tables, columns, measures
RankSales = var rankvalue = RANKX(all(Sales[Product]), CALCULATE(sum(Sales[Sales])))var rankthreshold = SELECTEDVALUE(RankSelect[RankSelect]) //this is your slicer table and columnreturn if(rankvalue<=rankthreshold, rankvalue, BLANK())3. Use this measure in the visuals you want to filter. Highlight each visual you want to filter with the slicer. For each, in the Filters pane on the right, drag your new measure into the "Filters On This Visual" area and choose "is not blank".If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Since you can't use a measure in a slicer, would you get the same effect by having a What If parameter/slicer and using a dynamic TopN approach instead (using the value selected on the slicer as the N in your TopN()? That way, only the countries with a rank below the selected value would show up in your visual.
This article show one good way to do it - https://community.powerbi.com/t5/Community-Blog/Dynamic-TopN-made-easy-with-What-If-Parameter/ba-p/367415
If this works for you, please mark it as solution. Kudos are appreciated too. Please let me know if not.
Regards,
Pat
Hi mahoneypat,
I tried this already. The problem with this aproach is, that the table doesnt interact with my other visuals from other tables. When I create a parameter, its the same like a new table and I dont have any relationship to the other one. I already tried this. =/
For me personaly it would be the best way to create a slicer with my created measure.
Is that possible?