Forum Discussion

POSPOS's avatar
POSPOS
Icon for Post Partisan rankPost Partisan
1 year ago
Solved

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. Roles: ...
  • v-ssriganesh's avatar
    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.