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
Syndicate_Admin
Administrator
Administrator

Conditional Visibility of Objects

Good afternoon

Need to show and hide a graffiti in Power BI-visual based on a certain role,

Can we achieve it?

To my knowledge, conditional visibility is available in Power BI using slicers and bookmarks, but I don't need a click button or slicer, it should change automatically depending on the role selected.

Please share the solutions that are available with you to accomplish this.

1 ACCEPTED SOLUTION

Hi @Syndicate_Admin,

You can dynamically control the visibility of a visual (graffiti) in Power BI based on the user's role, without using slicers or bookmarks. This can be done through Row-Level Security (RLS) and a Measure-Based Visual Filter. Thank you @Deku, for your insights. 

  • In Power BI, navigate to Model View, select Manage Roles, and create a new role (e.g., "Admin"). To filter data based on the logged-in user, use USERPRINCIPALNAME(). If you have a UserRoles table with [UserEmail] and [Role] columns, apply the RLS rule: [UserEmail] = USERPRINCIPALNAME()This ensures users see only the data relevant to their assigned role.  
  • Create a DAX measure to control the visibility of the graffiti visual:  

              ShowGraffiti = IF(SELECTEDVALUE(UserRoles[Role]) = "Admin", 1, 0)  

  • This measure returns 1 to display the visual if the user has the "Admin" role; otherwise, it returns 0, effectively hiding it.  
  • In Power BI, select the graffiti visual, then drag the ShowGraffiti measure into the Filters pane. Set the filter condition to Show items where ShowGraffiti = 1 to ensure the visual is displayed only for users with the appropriate role. 

  

Please refer to the below link for your reference: 

Solved: Hide and Show visuals based on condition - Microsoft Fabric Community  

  

If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.  

Thank you. 

View solution in original post

7 REPLIES 7
v-saisrao-msft
Community Support
Community Support

Hi @Syndicate_Admin ,
I wanted to check if you had the opportunity to review the information provided by @Deku. Please feel free to contact us if you have any further questions. If there response has addressed your query, please accept it as a solution and give a 'Kudos' so other members can easily find it.
Thank you.

I can't find the solution to my problem

Hi @Syndicate_Admin,

May I ask if you have resolved this issue? If so, please mark the helpful reply and accept it as the solution. This will be helpful for other community members who have similar problems to solve it faster.

Thank you.

Hi @Syndicate_Admin,
I hope this information is helpful. Please let me know if you have any further questions or if you'd like to discuss this further. If this answers your question, please Accept it as a solution and give it a 'Kudos' so others can find it easily.
Thank you.

Hi @Syndicate_Admin,

You can dynamically control the visibility of a visual (graffiti) in Power BI based on the user's role, without using slicers or bookmarks. This can be done through Row-Level Security (RLS) and a Measure-Based Visual Filter. Thank you @Deku, for your insights. 

  • In Power BI, navigate to Model View, select Manage Roles, and create a new role (e.g., "Admin"). To filter data based on the logged-in user, use USERPRINCIPALNAME(). If you have a UserRoles table with [UserEmail] and [Role] columns, apply the RLS rule: [UserEmail] = USERPRINCIPALNAME()This ensures users see only the data relevant to their assigned role.  
  • Create a DAX measure to control the visibility of the graffiti visual:  

              ShowGraffiti = IF(SELECTEDVALUE(UserRoles[Role]) = "Admin", 1, 0)  

  • This measure returns 1 to display the visual if the user has the "Admin" role; otherwise, it returns 0, effectively hiding it.  
  • In Power BI, select the graffiti visual, then drag the ShowGraffiti measure into the Filters pane. Set the filter condition to Show items where ShowGraffiti = 1 to ensure the visual is displayed only for users with the appropriate role. 

  

Please refer to the below link for your reference: 

Solved: Hide and Show visuals based on condition - Microsoft Fabric Community  

  

If this post helps, then please give us ‘Kudos’ and consider Accept it as a solution to help the other members find it more quickly.  

Thank you. 

Deku
Super User
Super User

You could use a measure to show a SVG. Then check if the user is listed in a table to toggle visibility

 

SVG=

If(

USERPRINCPALNAME() in seeSVG[email],

"..."

)

 

Need more information about what you are trying too do


Did I answer your question?
Please help by clicking the thumbs up button and mark my post as a solution!

sorry but your answer is not understood

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.