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

Level up your Power BI skills this month - build one visual each week and tell better stories with data! Get started

Reply
LP280388
Resolver II
Resolver II

Row Level Security to view manager and his directs

Hi Team,

 

Need a help on creating a DAX measure to add in Role condition under Manage Roles.

 

I have a table called "Employee_Master" where there are below columns.  The IsManager/Supervisor? column indicates if an employee is a manager or supervisor.

I need to now filter the data in RLS based on this condition.
The condition is "if an employee is a manager, then give access to his directs and himself. if not give access only to his record.

Kindly help me with the dax expression for RLS.

 

For example : if 1005 logs in, he should see himself (1005) and his subordinates 1003 & 1010

employee idEmployee nameManager IDSupervisor IDIsManager/Supervisor?
1001raghu  1
1002rathna100110031
1003suresh100110051
1004manju100210030
1005simha100210031
1006sam100210031
1007dan100110060
1008charan100110060
1009vijay100110060
1010sunil100510030

 

1 ACCEPTED SOLUTION
jsaunders_zero9
Responsive Resident
Responsive Resident

Try

FORMAT('Table'[Manager ID],"#") = USERPRINCIPALNAME()
||
FORMAT('Table'[Supervisor ID],"#") = USERPRINCIPALNAME() 
||
FORMAT('Table'[employee id],"#") = USERPRINCIPALNAME()

Note that the format function should not be required it was used for testing as the UPN was a number. Also suggest that you include an email field on your table so that you can use USERPRINCIPALNAME()

Good luck 

View solution in original post

4 REPLIES 4
LP280388
Resolver II
Resolver II

@jsaunders_zero9 thank you very much. I did the similar solution in my actual file. 

Glad that I could be of help @LP280388

jsaunders_zero9
Responsive Resident
Responsive Resident

Try

FORMAT('Table'[Manager ID],"#") = USERPRINCIPALNAME()
||
FORMAT('Table'[Supervisor ID],"#") = USERPRINCIPALNAME() 
||
FORMAT('Table'[employee id],"#") = USERPRINCIPALNAME()

Note that the format function should not be required it was used for testing as the UPN was a number. Also suggest that you include an email field on your table so that you can use USERPRINCIPALNAME()

Good luck 

jsaunders_zero9_0-1651531504898.png

jsaunders_zero9_2-1651531586001.png

 

 

Helpful resources

Announcements
April Power BI Update Carousel

Power BI Monthly Update - April 2026

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

Fabric SQL PBI Data Days

Data Days 2026 coming soon!

Sign up to receive a private message when registration opens and key events begin.

New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.