Forum Discussion
How do I use RLS (or some other way) to show/hide these visuals?
Hi JustinDoh1 ,
Yes, you can hide entire visuals based on RLS. Assuming that you have already created the RLS rules and then you can create a DAX measure that hides the visual based on role.
Something like this:
HideVisualMeasure = IF(ISUSERINROLE("RoleName"), 1, BLANK())
Then, in the visual, do the conditional formatting and use the measure to change the color or the visiblity or whatever settign you desire to make it "hidden"
- JustinDoh11 year ago
Post Prodigy
collinq Thank you so much. Great to know.
Is it possible for you to demonstrate/show me on my PBIX file by chance?
- JustinDoh11 year ago
Post Prodigy
I would like to follow up on my inquiry (whether you could show me on a PBIX file).
I tried RLS like below (traditional way), but obviously those three visuals would not do anything.
I am not sure how you can implement the measure you mentioned on the top. (I just cannot get my head around 😞 / I don't know where it should be placed..)
What is "ISUSERINROLE"? I thought it is one of name of functions in PowerBI, but I guess not.
Just in case needed, I have uploaded latest PBIX file here.
Thanks.
- JustinDoh11 year ago
Post Prodigy
collinq I am trying to apply a measure something like
HideVisualMeasure_ALI = IF(ALI[ALI Value],1,BLANK()) on my latest PBI file here.I am not sure how RLS is applied (it does not matter if RLS is used or not), but I am still confused as far as how to apply a central measure to individual visuals to hide using conditional formatting at this point.Thanks.
- collinq1 year ago
Super User
HI JustinDoh1 ,
After revewing your file I was making a couple of assumptions about your data structure. SO, the easiest way that I think to do this is to change your three separate slicers from three separate tables that you created for ALI, ARB and AVI and just use the Location value out of the tblscore table. This means that you can use the new TITLE SLICER and have all three available but when you use your RLS it automatically gets rid of the other two. This is what it looks like before using the RLS:
Then, after using the RLS of the ALI:
My other suggestion then is to use the data from the tblscore or the Location table itself. Then, you do not have to have the three created tables that you made but you could put the measures for the KEY and VALUE that you have in the three separate tables.
- JustinDoh11 year ago
Post Prodigy
collinq Thank you so much for getting back to me.
I tried the Tile slicer.
I am still having an issue with hidng the title when I am not supposed to see the title because whenever when one or two selections are selected (if it is not the only "ALI", choices slide to the left side. Is there way for Title Slicer to be fixed?
Basically, I am trying to use Title Slicer to block the top portion of each parameter.