Don't miss your chance to take the Fabric Data Engineer (DP-700) exam on us!
Learn moreWe've captured the moments from FabCon & SQLCon that everyone is talking about, and we are bringing them to the community, live and on-demand. Starts on April 14th. Register now
Hello everyone.
I have a Power bi file, which contains 3 sheets:
1.- Navigation menu to Visualizations (with 2 buttons that direct to the Visualizations of role 1 and 2)
2.- Visualization for 1st Role
3.- Visualization for 2nd Role
Is it possible to Show or Hide the navigation buttons depending on the role that I enter to use this file? For example if I have the following users: User1, User2.
User1 would only see button 1 that directs to Sheet with visualization 1.
User2 would only see button 2 that directs to Sheet with visualization 2.
Any ideas? Thank you very much in advance!
Solved! Go to Solution.
Consider using the Audiences feature, and different reports.
Hi @Cipriano
Yes, this is possible in Power BI by leveraging row-level security (RLS) and dynamic button visibility. Here's how you can do it:
Set Up Roles in Power BI:
Create a Table for Role-Based Navigation:
Role ButtonVisible Role1 1 Role2 2
Link the Roles to Users:
Create a Measure for Button Visibility: Use the RoleNavigation table to dynamically control button visibility:
ButtonVisibility =
VAR CurrentRole = SELECTEDVALUE(RoleNavigation[Role])
RETURN
IF(
CurrentRole = "Role1" && [Button] = "Button1", 1,
IF(CurrentRole = "Role2" && [Button] = "Button2", 1, 0)
)Apply Conditional Formatting to Buttons:
Test with View As Roles:
This approach ensures that:
Let me know if you need more details!
Please accept this as solution if it helps. Appreciate Kudos.
Hi @Cipriano,
@FarhanJeelani's definitely solution should work. You can further customize the button action to direct to a specific page or, alternatively, no action (via Destination setting) at all when user selects the button when user does not meet a specific criteria.
Hi @Cipriano
Yes, this is possible in Power BI by leveraging row-level security (RLS) and dynamic button visibility. Here's how you can do it:
Set Up Roles in Power BI:
Create a Table for Role-Based Navigation:
Role ButtonVisible Role1 1 Role2 2
Link the Roles to Users:
Create a Measure for Button Visibility: Use the RoleNavigation table to dynamically control button visibility:
ButtonVisibility =
VAR CurrentRole = SELECTEDVALUE(RoleNavigation[Role])
RETURN
IF(
CurrentRole = "Role1" && [Button] = "Button1", 1,
IF(CurrentRole = "Role2" && [Button] = "Button2", 1, 0)
)Apply Conditional Formatting to Buttons:
Test with View As Roles:
This approach ensures that:
Let me know if you need more details!
Please accept this as solution if it helps. Appreciate Kudos.
Hi,
Please can you tell us how you call the Button in the dax ? (same question as POSPOS)
Thanks,
@FarhanJeelani - I have a similar requirement and trying to make use of your solution, Can you please let me know how you are calling Button in your DAX. Do we have to create any table for this?
Hi,
Please did you find the solution how to call the Button in the dax ?
Select each button in your navigation menu.
Go to Format > Visual > Effects > Visibility.
Can you share a screenshot? Not seeing that option.
Hello, thank you very much for the support.
With the visibility options of the button, it was possible to show it or not, depending on the user, but only the buttons are hidden, if the user passes the mouse where the hidden button is, I could click and go to where it directed .
Is it possible to use safety Bookmarks and roles?
Hi @Cipriano,
@FarhanJeelani's definitely solution should work. You can further customize the button action to direct to a specific page or, alternatively, no action (via Destination setting) at all when user selects the button when user does not meet a specific criteria.
Consider using the Audiences feature, and different reports.
If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.
A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.
Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.
| User | Count |
|---|---|
| 52 | |
| 37 | |
| 35 | |
| 19 | |
| 17 |
| User | Count |
|---|---|
| 73 | |
| 70 | |
| 39 | |
| 34 | |
| 23 |