Forum Discussion

GraceTCL's avatar
GraceTCL
Helper II
5 years ago
Solved

Row level security cant work

Hi,

 

I am trying to implement dynamic row level security by following example at link:

https://www.youtube.com/watch?v=m0pYB-iq-gY

 

Steps suggested:

1. Create an "Employee" table to define the user profiles and reporting hierarchy.

2. Create an "Access" table that maps the row level access that the employee has, and in my case by "Vertical".

3. Manage Roles under "Modelling" tab and the formula that I input:

PATHCONTAINS(Employee[Hierarchy], Maxx(Filter(Employee, [Email] = USERPRINCIPALNAME()), Employee[EmployeeID]))

 

However, this doesnt work and I am not sure why.

My sample file enclosed at link below. Hope someone can advise.

https://www.dropbox.com/s/hkhx0yziyakgtbn/Sample.pbix?dl=0 

Thanks!

 

3 Replies

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi GraceTCL,

    I think this should more relate to path function, it is different than common DAX functions.
    In my opinion, I'd like to suggest expand the detailed user mapping to a new table and link the fact table. Then you can use this table to apply the RLS filter. (table structure, manage id, member id)

    Regards,

    Xiaoxin Sheng