Forum Discussion
How to filter values in a slicer based on role in RLS
- 3 years ago
Hi , jf2204
According to your description, the end need is " just hiding values from the slicer".
If this , Here are the steps you can refer to :
(1)This is my test data:(2)If you do not see the "c and d" in slicer we can use this measure:
Measure = var _slicer = SELECTEDVALUE('Table'[Column1]) return IF(_slicer in {"c","d"} ,-1 ,1)(3)Then we can put the measure on the "Filter on this visual" and we can meet the need.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly
If I use RLS on the table in the slicer then my visuals that aggregate the data will only aggregate on the values in the table that the user can see. The issue I have is for example, I want to show the entire company headcount in one visual and then in a second visual the user can select a division and see the headcount of that division. If I user RLS and filter the table the headcount for the entire company will not be accurate. Hence why I was thinking of just hiding values from the slicer as opposed to filtering the table that is used for the slicer.
Hi , jf2204
According to your description, the end need is " just hiding values from the slicer".
If this , Here are the steps you can refer to :
(1)This is my test data:
(2)If you do not see the "c and d" in slicer we can use this measure:
Measure = var _slicer = SELECTEDVALUE('Table'[Column1])
return
IF(_slicer in {"c","d"} ,-1 ,1)
(3)Then we can put the measure on the "Filter on this visual" and we can meet the need.
Thank you for your time and sharing, and thank you for your support and understanding of PowerBI!
Best Regards,
Aniya Zhang
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly