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
Bali21
Frequent Visitor

Level of Security by 3 role

Hello Every One,

 

I want to assign 3 level of security to my dashboard where I have more than 50k user.

1. People in Admin Coulmn can view all the data.

2.People in Manager 1 view are restricted only their data. They are not allowed to see anyone else numbers.

3. People in Manager 2 view are restricted only their data. They are not allowed to see anyone else numbers.

4. Can I add Proxy for any manager and they are allow to see their data along with Manager.

 

Note: I have more than 10K unique manager and cant assign role manually.

 

Any help how I can implement this in power BI. Small set of data are below.

 

EMP IDNameLocationAdminManager 1Manager 2
1ABDelJohnWadeIssac
2CDKolKevindaveAaron
3EFBomRobertSethAndrew
4GHBlrBrianIvanDavid
5IJChnCrishDabEvan
6CDBomBethJorgeGavin
7GHDelJohnWadeIssac
8GHKolKevindaveAaron
9IJBomRobertSethAndrew
10ABDelBrianIvanDavid

 

Thanks in advance!!

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

Hi , @Bali21 

Thanks for your sample data first!

According to your description, you want to " assign 3 level of security".

Here are the steps you can refer to :
(1)My test data is the same as yours.

(2)We can put this in the "Roles":

var _username= USERNAME()
var _admin =  ALL('Table'[Admin])
var _m1 = ALL('Table'[Manager 1])
var _m2 = ALL('Table'[Manager 2])
var _m1_cur = [Manager 1]
var _m2_cur  = [Manager 2]
return
IF(_username in _admin , True() , IF( _username in _m1 &&  _username = _m1_cur ,True()  , IF( _username in _m2 &&  _username = _m2_cur ,True() ,False()))) 

vyueyunzhmsft_0-1685338610645.png

(2)Then we can test in the "View Roles":

vyueyunzhmsft_1-1685338629221.pngvyueyunzhmsft_2-1685338635762.png

 

For more information, you can refer to :
Dynamic Row Level Security with Power BI Made Simple - RADACAD

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

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

3 REPLIES 3
v-yueyunzh-msft
Community Support
Community Support

Hi , @Bali21 

Thanks for your sample data first!

According to your description, you want to " assign 3 level of security".

Here are the steps you can refer to :
(1)My test data is the same as yours.

(2)We can put this in the "Roles":

var _username= USERNAME()
var _admin =  ALL('Table'[Admin])
var _m1 = ALL('Table'[Manager 1])
var _m2 = ALL('Table'[Manager 2])
var _m1_cur = [Manager 1]
var _m2_cur  = [Manager 2]
return
IF(_username in _admin , True() , IF( _username in _m1 &&  _username = _m1_cur ,True()  , IF( _username in _m2 &&  _username = _m2_cur ,True() ,False()))) 

vyueyunzhmsft_0-1685338610645.png

(2)Then we can test in the "View Roles":

vyueyunzhmsft_1-1685338629221.pngvyueyunzhmsft_2-1685338635762.png

 

For more information, you can refer to :
Dynamic Row Level Security with Power BI Made Simple - RADACAD

 

 

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem. (You can also upload you sample .pbix [without sensitive data] to the OneDrive and share with the OneDrive link to me ! )

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

 

@v-yueyunzh-msft :

Thank for the solution, Though I have used Path function to resolve above mention issue!!

I am facing yet another issue😬

I have two data source and I want to use single filter for both the data.Not able to figure how to acheive it.

Table 1:

EMP nameLoc IDManager 3Manager 2Manager1
Rezza33JohnWadeIssac
Mark33JohnWadeIssac
Amy22JohnWadeIssac
Issac33JohnWade 
Wade77John  
Dab444Leena  
Evan333LeenaDab 
lylla111LeenaDabEvan
Ray111LeenaDabEvan

 

Table2:

Location OwnerLoc ID
Issac33
Issac22
Issac44
Wade77
Wade88
John55
John66
John99
Evan111
Evan222
Evan555

 

ScreenShot of PBI without filter:

Bali21_0-1685735011751.png

Once filter is applied Viz 1 not changing, it only applicable to table viz. Could you please suggest how it can be achived. So If I select "Issac" then both viz should be changes as per selection.

 

Thank in Advance!

 

 

Bali21
Frequent Visitor

@amitchandak : I have got the heirarcical RLS and implemented the same.

 

Not sure how I can get for Admin role where user can view all the data and for the proxy role - Role assign to some individual on behalf of manager.

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.

Top Solution Authors
Top Kudoed Authors