Forum Discussion

Ybam's avatar
Ybam
Icon for Helper I rankHelper I
4 years ago
Solved

RLS with multiple filters and values

Hello, 

We've created a data model in PBI with multiple fact tables linked with dimension tables.
We've a web application in which we can define permissions for a user to see data of one or several projects and 1 or several team members.
In our data model team members and project correspond to differents dimension tables.

 

We know how RLS works for one user to see one project or one team member 's data with static value.

We would like to know how to proceed to define RLS with multiple dynamic values in the two filters (project and team members).

For information the dynamic values are stored in a database by the web application.

  • Ybam , As long as you can create a table with email id and project which user can access you can filter.

     

    Create a table like

    Project Id ,email

     

    This can have m-m join with project table

     

    You can have another table

     

    Team - email Id

     

    This can have M-M join with Employee/team /person table

     

    Make sure it filters the dimension

     

    in RLS you just need filter email of these table

     

    [email_id] = userprinicpalname()

     

    How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk

2 Replies

  • Ybam , As long as you can create a table with email id and project which user can access you can filter.

     

    Create a table like

    Project Id ,email

     

    This can have m-m join with project table

     

    You can have another table

     

    Team - email Id

     

    This can have M-M join with Employee/team /person table

     

    Make sure it filters the dimension

     

    in RLS you just need filter email of these table

     

    [email_id] = userprinicpalname()

     

    How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi Ybam ,

     

    Does the replies above solve your problem? If it has been solved, please mark the correct reply as the standard answer to help the other members find it more quickly.Thanks in advance for your kind cooperation!

     

    Community Support Team _ Caitlyn

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