cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
gil12
Regular Visitor

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
Super User IV
Super User IV

Re: Dynamic RLS - Children with missing Parent Keys

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

---------------------------------------

Not the Power BI thought police...

I have NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

gil12
Regular Visitor

Re: Dynamic RLS - Children with missing Parent Keys

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

Super User IV
Super User IV

Re: Dynamic RLS - Children with missing Parent Keys

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

---------------------------------------

Not the Power BI thought police...

I have NEW book! 
DAX Cookbook from Packt
Over 120 DAX Recipes!
Did I answer your question? Mark my post as a solution!

Proud to be a Datanaut!

gil12
Regular Visitor

Re: Dynamic RLS - Children with missing Parent Keys

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
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors