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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
POSPOS
Post Patron
Post Patron

How to hide buttons based on user role

Hi All,

I have two roles in Power BI desktop. My requriment is that , from the image below, the toggle button and the Text should  be hidden for Role 1 and it should show for Role 2.

POSPOS_0-1747925896794.png
Roles:
Role 1:

POSPOS_2-1747926145774.png

Role 2: 

POSPOS_3-1747926175943.png

Can someone please suggest how this can be achieved?

Thank you

 

1 ACCEPTED SOLUTION
v-ssriganesh
Community Support
Community Support

Hi @POSPOS,
Thank you for reaching out to the Microsoft Fabric Community Forum.

I have reproduced your scenario in Power BI Desktop and I achieved the expected outcome based on your requirements:

  • When RLS_1 user clicks the "Continue" button → they are redirected to Page_Role1.
  • When RLS_2 user clicks the "Continue" button → they are redirected to Page_Role2.

This was achieved using:

  • Row-Level Security (RLS) to identify the user role.
  • A DAX measure to determine the destination page dynamically.
  • A button with conditional navigation configured via the Action > Page Navigation > Field value option.

For your reference, I’ve attached the .pbix file that demonstrates this setup end-to-end. You can open it in Power BI Desktop and test it using “View as Role” from the Modeling tab.

If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

View solution in original post

5 REPLIES 5
v-ssriganesh
Community Support
Community Support

Hi @POSPOS,

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

Thank you.

v-ssriganesh
Community Support
Community Support

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

v-ssriganesh
Community Support
Community Support

Hi @POSPOS,
Thank you for reaching out to the Microsoft Fabric Community Forum.

I have reproduced your scenario in Power BI Desktop and I achieved the expected outcome based on your requirements:

  • When RLS_1 user clicks the "Continue" button → they are redirected to Page_Role1.
  • When RLS_2 user clicks the "Continue" button → they are redirected to Page_Role2.

This was achieved using:

  • Row-Level Security (RLS) to identify the user role.
  • A DAX measure to determine the destination page dynamically.
  • A button with conditional navigation configured via the Action > Page Navigation > Field value option.

For your reference, I’ve attached the .pbix file that demonstrates this setup end-to-end. You can open it in Power BI Desktop and test it using “View as Role” from the Modeling tab.

If this information is helpful, please “Accept as solution” and give a "kudos" to assist other community members in resolving similar issues more efficiently.
Thank you.

Hi @POSPOS,
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 other community members with similar problems can find a solution faster.
Thank you.

Ritaf1983
Super User
Super User

Hi @POSPOS 

You're asking whether a toggle button (like "Department") can be hidden for Role 1 and shown only for Role 2 using RLS.

To clarify: Row-Level Security (RLS) only restricts the data that is visible to users – it does not control the visibility of visual elements like buttons, tabs, or bookmarks.

If you want to show or hide visuals based on roles, you'll need to use DAX-based conditional formatting (like using a measure to control the visibility of a visual via a transparent shape) or manage it via separate report pages and bookmarks, possibly combined with a slicer value filtered by role-specific logic.

If this post helps, then please consider Accepting it as the solution to help the other members find it more quickly.

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

Find out what's new and trending in the Fabric community.