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

Grow your Fabric skills and prepare for the DP-600 certification exam by completing the latest Microsoft Fabric challenge.

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
RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.

MayPowerBICarousel

Power BI Monthly Update - May 2024

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