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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
hemanth_423
Frequent Visitor

Help with Row level Security

I have a fact table with these information

ManagerSupervisorAgentMonth-YearCommission
BethTonyraviSaturday, January 1, 2022252
BethTonybhushanSaturday, January 1, 2022358
BethXinjohnSaturday, January 1, 2022368
BethXinthomasSaturday, January 1, 2022357
HemanthrahulrajuSaturday, January 1, 2022359

 

User table:

RoleUsernameEmail
ManagerBethBeth@domian.com
ManagerHemanthHemanth@domian.com
SupervisorTonyTony@domian.com
SupervisorXinXin@domian.com
Supervisorrahulrahul@domian.com
Agentraviravi@domian.com
Agentbhushanbhushan@domian.com
Agentjohnjohn@domian.com
Agentthomasthomas@domian.com
Agentrajuraju@domian.com

hierarchy ---manager-->supervisor-->agent

When agent log in to power bi service then he can only view his data,
when supervisor logs in he can view the data of agents who reports to him,
when manager logs in he can view the data of supervisors and agents who reports to him.

Thanks in advance


1 ACCEPTED SOLUTION
Jihwan_Kim
Super User
Super User

Hi,

Please check the attached pbix file, and the below pictures.

 

I suggest having a [Report to] column in Users table, like the attached pbix file.

And then, try creating [Path CC] column in the same table.

 

Path CC = 
PATH( User[Username], User[Report to] )

 

 

Under "Manage roles" menu, 

try wrting a formula like below.

Jihwan_Kim_1-1672732457395.png

 

And then, you can try to test the result of RLS.

Jihwan_Kim_3-1672732531678.png

 

 

Jihwan_Kim_0-1672732384293.png

 

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

View solution in original post

4 REPLIES 4
Jihwan_Kim
Super User
Super User

Hi,

Please check the attached pbix file, and the below pictures.

 

I suggest having a [Report to] column in Users table, like the attached pbix file.

And then, try creating [Path CC] column in the same table.

 

Path CC = 
PATH( User[Username], User[Report to] )

 

 

Under "Manage roles" menu, 

try wrting a formula like below.

Jihwan_Kim_1-1672732457395.png

 

And then, you can try to test the result of RLS.

Jihwan_Kim_3-1672732531678.png

 

 

Jihwan_Kim_0-1672732384293.png

 

 

 

 


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.

Thanks a lot for the solution

Idrissshatila
Super User
Super User

Hello,

 

Check this video to make RLS based on the email https://www.youtube.com/watch?v=axTyP7I2Bso&t=408s

 

If I answered your question, please mark my post as solution, Appreciate your Kudos👍

Follow me on Linkedin



Did I answer your question? Mark my post as a solution! Appreciate your Kudos
Follow me on LinkedIn linkedIn
Vote for my Community Mobile App Idea

Proud to be a Super User!




Hi 

Thank you for the response but i have a differnet scenario where i cant have relationship between fact and security table


Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.