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
TOYER01
Helper I
Helper I

ACCESS TO SPECIFIC PAGE USING BUTTON TO NAVIGATE

I have 4 pages of different dashaboards.

 

Another page having 4 buttons only, which is used to navigate to various pages. (see Screnshot).

 

So i need help on;

 

1. Each Page should be accessible to specific users(using their email id or login), page not accessible to, should be greyed out and unclickable.

 

TOYER01_0-1684597492432.png

 

1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @TOYER01 

According to your description , you want to create four button in your page , and each user has the different permission for the buttons.

For your need , we need to use dybamic RLS to relaize it , for this you can refer to :
Dynamic Row Level Security with Power BI Made Simple - RADACAD

 

First, you can create four buttons  and then we need to have a permission table like this:

vyueyunzhmsft_0-1684721050365.png

Then we need to create four measures to control the color for these buttons:

Page1 Color = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 1"} in _pages ,"green","grey")
Page2 Color = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 2"} in _pages ,"green","grey")
Page3 Color = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 3"} in _pages ,"green","grey")
Page4 Color = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 4"} in _pages ,"green","grey")

 

Then we can put it in the "Style->Fill->fx":

vyueyunzhmsft_1-1684721166304.png

 

Then we need to create four measures to control the action for these buttons:

Page1 = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 1"} in _pages ,"Page 1",BLANK())
Page2 = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 2"} in _pages ,"Page 2",BLANK())
Page3 = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 3"} in _pages ,"Page 3",BLANK())
Page4 = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 4"} in _pages ,"Page 4",BLANK())

 

Then we need to put them in the action of the button:

vyueyunzhmsft_2-1684721257634.png

 

Then we can test it in the "View":

vyueyunzhmsft_3-1684721279566.png

The result is as follows:

vyueyunzhmsft_4-1684721290759.png

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

View solution in original post

1 REPLY 1
v-yueyunzh-msft
Community Support
Community Support

Hi , @TOYER01 

According to your description , you want to create four button in your page , and each user has the different permission for the buttons.

For your need , we need to use dybamic RLS to relaize it , for this you can refer to :
Dynamic Row Level Security with Power BI Made Simple - RADACAD

 

First, you can create four buttons  and then we need to have a permission table like this:

vyueyunzhmsft_0-1684721050365.png

Then we need to create four measures to control the color for these buttons:

Page1 Color = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 1"} in _pages ,"green","grey")
Page2 Color = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 2"} in _pages ,"green","grey")
Page3 Color = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 3"} in _pages ,"green","grey")
Page4 Color = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 4"} in _pages ,"green","grey")

 

Then we can put it in the "Style->Fill->fx":

vyueyunzhmsft_1-1684721166304.png

 

Then we need to create four measures to control the action for these buttons:

Page1 = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 1"} in _pages ,"Page 1",BLANK())
Page2 = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 2"} in _pages ,"Page 2",BLANK())
Page3 = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 3"} in _pages ,"Page 3",BLANK())
Page4 = var _user =USERPRINCIPALNAME()
Var _pages =SELECTCOLUMNS( FILTER('Table','Table'[Name] = _user) , "pages" ,[Column1])
return
IF({"Page 4"} in _pages ,"Page 4",BLANK())

 

Then we need to put them in the action of the button:

vyueyunzhmsft_2-1684721257634.png

 

Then we can test it in the "View":

vyueyunzhmsft_3-1684721279566.png

The result is as follows:

vyueyunzhmsft_4-1684721290759.png

 

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly

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.