Forum Discussion

Hyuna_8000's avatar
Hyuna_8000
Helper I
1 year 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...
  • Hyuna_8000's avatar
    Hyuna_8000
    1 year 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)