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
gil12
Helper I
Helper I

Dynamic RLS - Children with missing Parent Keys

Hi All,

 

I'm trying to Implement a Dynamic RLS at my organization. I have gotten the employee structure from ActiveDirectory. It works perfectly fine for majority of the cases, except of the ones who are missing Parents/Managers. Hierarchy in path column using Path function would just stop there, it wouldn't even propage to Highest level that is to the CEO.

For example - Let's say directory has managers from two deparment reporting to him and through managers he would also see employee records who report to those managers. Now the problem arises if one of the department's manager's postion is vacant. Then neither diretor is not seeing those deparment's employee records nor VP's, CEO are able to see those employee records.

 

Can anyone please help me mitigate this issue, if anyone has faced this issue? Thanks in advance!

In Below data LAD02 is CEO, but due to missing ParentID for some Employees, HierarchiesPath is not going up to that level. Basically what i need is, if an deparment FO supervisor is missing, that employee should automatically report to Director and if directos is missing, employee should automatically report to VP and so on....

 

I'm using below Dax code for RLS (ignore name of table and columns as it's from other table)

PATHCONTAINS(account[Path],
MAXX(
Filter(account,
account[organizationalPerson.mail] = USERPRINCIPALNAME()),
account[PeopleSoftChildID_int]))

 

Capture.PNG

 

 

4 REPLIES 4
Greg_Deckler
Super User
Super User

Sounds like you should implement a calculated column that performs the necessary Parent ID lookup?

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Yes, that's what i thought but can't think of how to implement it! Any help or guidance will be appreciated

If you can post some sample data as text and point me towards the issues I can take a look.

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

https://drive.google.com/file/d/19UYOzSwrV1M_vl9H1JFRMnyyvSyuhzl5/view?usp=sharing 

 

Here's a file link in google drive!

 

Thanks for your time and help in advance!

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.