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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
WilliamA
Helper I
Helper I

RLS across different fields of a same table.

Hi All,

 

I have a table that has 4 fields

ID, Assigned_Person, Target_Person,Due_Date

I have 2 table visuals using the same table above however for the user logged in I want table 1 to use RLS based on the assigned_Person Field and table 2 to be filtered down based on the target_person field.

 

How can this be achieved?

 

I am thinking of loading in the original table twice and applying RLS on each - would this need to be 2 different roles or the same role with multiple conditions?

 

Any other suggestions on how this can be achieved?

2 ACCEPTED SOLUTIONS
sjoerdvn
Super User
Super User

As I see this, this is not about Row Level Security, but about filterering visuals based on the logged in user. 
To do that, you would create some measures using functions like USERPRINCIPALNAME and use those in filters on the visuals. 
If the users have build authorization on the data, you would off course still need to implement RLS to avoid access to data they are not allowed to see.

View solution in original post

Anonymous
Not applicable

Hi,

Thanks for the solutions raji_n  and sjoerdvn offered, and i want to offer some more information for user to refer to.

hello @WilliamA , based on your descriotion, you can unpivot your table to the followign format in power query first.

vxinruzhumsft_0-1724395354388.png

Then create two table visual, one select the person_type is Assigned_Person, the other is Target_Person.

vxinruzhumsft_1-1724395449298.png

 

vxinruzhumsft_2-1724395459201.png

 

Then create a rls.

USERPRINCIPALNAME()='Table'[Person]

vxinruzhumsft_3-1724395491649.png

 

Then it can work.

 

Best Regards!

Yolo Zhu

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
Anonymous
Not applicable

Hi,

Thanks for the solutions raji_n  and sjoerdvn offered, and i want to offer some more information for user to refer to.

hello @WilliamA , based on your descriotion, you can unpivot your table to the followign format in power query first.

vxinruzhumsft_0-1724395354388.png

Then create two table visual, one select the person_type is Assigned_Person, the other is Target_Person.

vxinruzhumsft_1-1724395449298.png

 

vxinruzhumsft_2-1724395459201.png

 

Then create a rls.

USERPRINCIPALNAME()='Table'[Person]

vxinruzhumsft_3-1724395491649.png

 

Then it can work.

 

Best Regards!

Yolo Zhu

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

 

raji_n
Resolver II
Resolver II

@WilliamA yes you can combine values of both the tables for implementing RLS

sjoerdvn
Super User
Super User

As I see this, this is not about Row Level Security, but about filterering visuals based on the logged in user. 
To do that, you would create some measures using functions like USERPRINCIPALNAME and use those in filters on the visuals. 
If the users have build authorization on the data, you would off course still need to implement RLS to avoid access to data they are not allowed to see.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

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