Forum Discussion
How to hide buttons based on user role
- 1 year ago
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
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.