Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
2 years ago
Solved

Hierarchical row level security Dax using Pathcontains

Hi everyone,   I need to create a new role in Manage Roles to set up a row level security according to our hierarchy. I tried to use Pathcontains in the dax but still can't get the code working cor...
  • Anonymous's avatar
    Anonymous
    2 years ago

    Thank you, the data comes as forward slash so I converted it to the Pipe symbol, the the following DAX works!
    VAR EmployeeName = LOOKUPVALUE(Employee[Employee Name], Employee[Email], USERPRINCIPALNAME())
    RETURN
    PATHCONTAINS(Employee[Hierarchy], EmployeeName)