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

Dynamic Row Level Security based on Hierarchies with multiple managers??

Hello everyone.

I cannot figure this out after weeks of trying. Hopefully the awesome folks here can tell me if I wasting my time searching for a solution. 

I have set up a dynamic Row level security column for my dashboard that works just as it is supposed to.  Employees complete surveys using MS Forms, which populate a SharePoint list, which feeds the PowerBI.  The problem is that in my company, people sometimes change managers. When that happens, and new data is submitted by he new manager, it creates an error in my DAX formula for that column. I am assuming this is because the formula cannot reconcile a person having two managers in the data.  I assumed that the formula would just simply create a new record with the new manager, and keep the old record with the former manager, but that's not happening.  

 

My formula uses the email of the employee and manager for the hierchy:

EmployeePath = Path('Table Name'[EmployeeEmaiId],'Table Name'[ManagerEmailID])

 

And gives me results like this when working with only one manager per employee. The first number is the email id of the top manager, the second number and subsequent numbers are the records that manager can see in the dashboard.

 

403|88|12|82

403|88|12

403|26

403|88|23

 

in my case, what if manager #88 leaves the company and is replaced with manager #90? Is there a way for the DAX to accept that manager #90 is now the manager of employee #12 and #23?

1 REPLY 1
amitchandak
Super User
Super User

@Anonymous , Based on what I got your employee table overwrites the data of the manager.

 

Have you already checked this out - https://www.blue-granite.com/blog/using-dynamic-row-level-security-with-organizational-hierarchies

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.