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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
JustinDoh1
Post Prodigy
Post Prodigy

How do I use RLS (or some other way) to show/hide these visuals?

I have uploaded my PBIX file here.

 

This question is somewhat related to my previous post, but business requirement has been changed, so I am posting this question.

 

I have these three visuals (ALI, ARB & AVI: created with Parameters).

JustinDoh1_0-1733447786486.png

 

Initially, I used Bookmarks to show and hide these visuals separately, but now, requirement has been chnaged -->

I would like to use just a regular filter like "Location" to display/hide these three visuals.

 

I created relationship between "Location" table and respective three tables that were created with parameter to see if there is any way it could be done.

JustinDoh1_1-1733447152918.png

 

Is there anyway I could do it with RLS or with some other method?

6 REPLIES 6
collinq
Super User
Super User

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"




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




@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.
JustinDoh1_0-1733875061536.png

Thanks.

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:

collinq_0-1734056755437.png

 

Then, after using the RLS of the ALI:

collinq_1-1734056850476.png

 

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.




Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!
Private message me for consulting or training needs.




@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.

JustinDoh1_0-1734128232826.png

JustinDoh1_1-1734128661411.png

 

@collinq Thank you so much. Great to know.

Is it possible for you to demonstrate/show me on my PBIX file by chance?

@collinq 

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.

JustinDoh1_1-1733783242994.png

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.

 

 

 

 

 

Helpful resources

Announcements
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!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.