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

Join the Fabric FabCon Global Hackathon—running virtually through Nov 3. Open to all skill levels. $10,000 in prizes! Register now.

Reply
ghouse_peer
Post Patron
Post Patron

RLS for names available in column

Hi Team

 

I need your help for below requirement.

I have 2 Columns

 

Leadership and Manager.

LeadershipManager
ABCEWQ
ABCERT
XYZJKL
CDELKJ
CDEOKM
QWELPO
TUVUNM
RFVKJH
MNBTGB

Leadership contains 7 Unique names of Leadership

Manager column contains 12 unique names of manager belonging to respective Leadership.

 

Now i need to provide RLS for respective leadership and managers. Whenever they login or access the report they need to see only there reports.

 

ex: if XYZ from leadership is accessing report then he need to see only his reports and his manger's report who is under him.

 

Kindly help with solution. Thanks in advance

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hi @ghouse_peer ,

 

Based on your description, this involves concepts related to dynamic RLS. You can do this with username and userprinciplename, but you need to be aware of their differences:
In Power BI Desktop, username() will return the user in DOMAIN\User format and userprincipalname() will return the user in user@contoso.com format.
In Power BI Services, both username() and userprincipalname() will return the user's User Principal Name (UPN). This looks similar to an e-mail address.


Refer to the following screenshot:

vkongfanfmsft_0-1704703270903.png

after publish to the service, test RLS

vkongfanfmsft_1-1704703353669.png

vkongfanfmsft_2-1704703405724.png

 

Also, you can refer to below document:

Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

Dynamic Row Level Security with Power BI Made Simple - RADACAD

 

Best Regards,
Adamk Kong

 

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

2 REPLIES 2
Anonymous
Not applicable

Hi @ghouse_peer ,

 

Based on your description, this involves concepts related to dynamic RLS. You can do this with username and userprinciplename, but you need to be aware of their differences:
In Power BI Desktop, username() will return the user in DOMAIN\User format and userprincipalname() will return the user in user@contoso.com format.
In Power BI Services, both username() and userprincipalname() will return the user's User Principal Name (UPN). This looks similar to an e-mail address.


Refer to the following screenshot:

vkongfanfmsft_0-1704703270903.png

after publish to the service, test RLS

vkongfanfmsft_1-1704703353669.png

vkongfanfmsft_2-1704703405724.png

 

Also, you can refer to below document:

Row-level security (RLS) with Power BI - Power BI | Microsoft Learn

Dynamic Row Level Security with Power BI Made Simple - RADACAD

 

Best Regards,
Adamk Kong

 

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

Ritaf1983
Super User
Super User

Hi @ghouse_peer 
Please refer to the linked tutorial

https://www.youtube.com/watch?v=c1P3W3xJl_4&t=2s

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

Regards,
Rita Fainshtein | Microsoft MVP
https://www.linkedin.com/in/rita-fainshtein/
Blog : https://www.madeiradata.com/profile/ritaf/profile

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors