Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
4 years ago
Solved

Row Level Security with Multiple levels (Complicated)

Hi,

 

I am looking to implement RLS for multiple levels.

I have 2 tables as below.

1) Groups

2) Tasks

Groups table will have , Group name and Member email.

 

And tasks will have below columns

 

Upon login by the user i want to filter my report in below ways.

Rule: 1) all the records should be visible wherer Isrestricted = NO for every user.
Rule 2: 2) Up on login by User, Rule 1 above should be applied and also, Isrestricted group = Yes and it should look at group table who is the user and how many groups the user is part of and only those groups in Tasks table should be filtered.
Rule 3: 3) Irrespective of above, who ever part of submitted by in the tasks table they have to see all the submitted by records along with Isrestricted access = NO.

 

I have tried relaly very hard to crack this and finally coming here for help from great minds.

 

 

Attaching the PBIX for your perusal. Appriciate your help guys.

 

https://1drv.ms/u/s!ApY7Qk9reuaNiw9L76Qr3dkIwHC6?e=LAe1al


@Pragati11 @amitchandak @ValtteriN 

2 Replies

  • RLS rules are ORed together. The more permissive rules override the more restrictive rules.  You cannot have multi level "AND" style rules.

     

    Flatten your hierarchies and apply a single set of rules.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Anonymous 

    I saw you have published your issue in DAX Commands and Tips forum and the issue is marked  . Have your issue been solved ? If yes , please consider Accept it as the solution to help the other members find it more quickly.  The link below is the issue you published in DAX Commands and Tips forum .

    https://community.powerbi.com/t5/DAX-Commands-and-Tips/Row-Level-Security-with-Multiple-levels-Complicated/td-p/2307630 

     

    Best Regard

    Community Support Team _ Ailsa Tao

    If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.