Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

RLS for Org Hierarchy with Multiple Managers

Current State

  • I currently have RLS implemented for the following scenario:
    Manager -> MD -> VP -> SVP -> C-Suite 
  • Each position has one or more work groups that report to them.
  • I have 3 types of tables:
    1. Emp Table that has emp details (emp num, mgr emp num, work email),
    2. a mapping table that maps emp num to Work Groups
    3. Detailed expenses divided by categories for each Workgroup i.e LTE has expense details for LTE Category for all workgroups and so on
      My model looks like:

  • RLS implemented using path and path contains function:
    PATHCONTAINS(
    Emp_Hierarchy[Hierarchy],
    MAXX(
    FILTER(
    'Emp_Hierarchy',
    [work_email_address] = USERPRINCIPALNAME()
    ),
    Emp_Hierarchy[emp_nbr]
    )
    )
    Issue:

I need emp 3 and 5 to see the same data that 6 can see even though they report to 6. Similarly, I need 8 to see the same data that 10 can see. 
How can i implement this?

1 Reply