Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
Anonymous
Not applicable

Page Navigation Challenge

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.  

 

Navigation = IF(
SELECTEDVALUE('Page Level Security'[Role])="Manager",
"Executive Summary","Limited Access")

 

 

1 ACCEPTED SOLUTION
jdbuchanan71
Super User
Super User

@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

 

View solution in original post

2 REPLIES 2
jdbuchanan71
Super User
Super User

@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
Not applicable

Brilliant @jdbuchanan71     Just tested and it looks like this is going to work!   Thank you Thank You!

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.