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