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.
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.
Solved! Go to Solution.
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:
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":
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:
Then we can test it in the "View":
The result is as follows:
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
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:
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":
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:
Then we can test it in the "View":
The result is as follows:
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
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 |
---|---|
106 | |
94 | |
77 | |
65 | |
53 |
User | Count |
---|---|
145 | |
105 | |
104 | |
90 | |
63 |