Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
Hello Community,
I've watched several videos on this and read various blogs but none of them seem to quite do exactly what I am looking to do.
I have a report with 4 pages, all hidden except for the home page (landing page). I have buttons on the home page - the table of contents essentially, that link to these hidden pages. The idea is that if you are not a manager, the first button (which navigates to a sensitive financial page) will not even be visible...or it could be visible but just not functional, and might say something like "Limited Access" on the button text. If you ARE a manager, this button will say "Executive Summary" and you will be able to click on it...assuming you have the right role defined in the RLS.
I have a table set up with a column for Roles, and a column for UserPrincipalName. And I am currently using this measure below. It works, but it requires a selection to be made.
My goal is for no "selection" to be necessary. The users would simply land on the home page, and based on their userprincipalname (and role as defined by RLS) would either be able to interact with that button or not.
Solved! Go to Solution.
@Anonymous
You should be able to calculate it just using the logged-in user's USERPRINCIPALNAME() which would not require a selection.
Navigation =
VAR _UPN =
USERPRINCIPALNAME ()
VAR _Role =
CALCULATE (
SELECTEDVALUE ( 'Page Level Security'[Role] ),
'Page Level Security'[UserPrincipalName] = _UPN
)
RETURN
IF ( _Role = "Manager", "Executive Summary", "Limited Access" )
Then combine that with conditional page navigation for buttons.
https://www.youtube.com/watch?v=M1TZ5NCQKXo&ab_channel=HavensConsulting
@Anonymous
You should be able to calculate it just using the logged-in user's USERPRINCIPALNAME() which would not require a selection.
Navigation =
VAR _UPN =
USERPRINCIPALNAME ()
VAR _Role =
CALCULATE (
SELECTEDVALUE ( 'Page Level Security'[Role] ),
'Page Level Security'[UserPrincipalName] = _UPN
)
RETURN
IF ( _Role = "Manager", "Executive Summary", "Limited Access" )
Then combine that with conditional page navigation for buttons.
https://www.youtube.com/watch?v=M1TZ5NCQKXo&ab_channel=HavensConsulting
Brilliant @jdbuchanan71 Just tested and it looks like this is going to work! Thank you Thank You!
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
109 | |
100 | |
85 | |
77 | |
66 |
User | Count |
---|---|
120 | |
111 | |
95 | |
83 | |
75 |