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
mark_carlisle
Advocate IV
Advocate IV

Help required: Dynamic Row Level Security with conditions

I have the following example data and from this I would like to create dynamic row level security to simplify the process on managing permisson levels on reports and ensure people only see what they need to.

 

EmployeeNameEmployeeNumberEmployeeEmailAddressEmployeeUPNManagerEmployeeKeyIsManagerIsTrainingManagerIsCoachIsDeputyEmployeeKey
Mark1mark@example.commark@example.com 10001
Frank2frank@example.comfrank@example.com110002
Sophie3sophie@example.comsophie@example.com111003
Ruby4ruby@example.comruby@example.com200104
Ben5ben@example.comben@example.com200015
John6john@example.comjohn@example.com300006
Lisa7lisa@example.comlisa@example.com300007
Paul8paul@example.compaul@example.com111008
Rebecca9rebecca@example.comrebecca@example.com110009
Lucy10lucy@example.comlucy@example.com8000010
John-Paul11john-paul@example.comjohn-paul@example.com8000011
Simon12simon@example.comsimon@example.com9000112
Alan13alan@example.comalan@example.com9000013

 

Visual the org stucture looks like this;

 

Capture.PNG

 

Example

  • Mark, Frank, Sophie, Paul and Rebecca are all managers (IsManager = 1) so should be able to see all data in the report.
  • Ruby is on a development opportunity and is coaching (IsCoach = 1) the new starters that the training managers manage (IsTrainingManager = 1)
    • Because of this Ruby should be able to see her own data plus those of John, Lisa, Lucy, John-Paul as they are managed by Sophie and Paul.
  • Ben and Simon act as deputies (IsDeputy = 1) in their managers, Frank and Rebecca, absence.
    • Because of this Ben and Simon should be able to see the data of their team. For clarity;
      • Ben should be able to see his and Rubys figures
      • Simon should be able to see his and Alans figures

Essentialy its comes down to;

  • IsManager = 1 should have unrestricted access.
  • IsCoach = 1 should have access to only their data and that of the direct reports of the training managers, IsTrainingManager = 1.
  • IsDeputy = 1 should have access to only their data and that of there managers direct reports.

 

I've tried a few things but I'm having issues with the logic.

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

Hi @mark_carlisle 

 

Please refer to this blog to set the RLS with organizational hierarchy:

https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi

 

Community Support Team _ Dina Ye
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
v-diye-msft
Community Support
Community Support

Hi @mark_carlisle 

 

If my above post helps, could you please consider Accept it as the solution to help the other members find it more quickly. thanks!

 

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.
v-diye-msft
Community Support
Community Support

Hi @mark_carlisle 

 

Please refer to this blog to set the RLS with organizational hierarchy:

https://radacad.com/dynamic-row-level-security-with-organizational-hierarchy-power-bi

 

Community Support Team _ Dina Ye
If this post helps, then please consider Accept it as the solution to help the other members find it more
quickly.

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.