Forum Discussion

Adam01's avatar
Adam01
Advocate I
3 years ago
Solved

Dynamic RLS for users based on a column value with non-unique values

Hello everyone, I'm trying to implement a holiday tracking PowerBI Report that has a dimension table with all the staff names and their respective department, please see below for an example:   ...
  • AlanFredes's avatar
    3 years ago

    Hi Adam01,

     

    You are almost there with the RLS setup.
    What you need is the ability to filter a table by the User that then filters another table (through a relationship) to identify which department they belong to. This last table would then be used to filter all other data (using relationships).

    Something like this:

    This allows for the following RLS setup to be made:

     

    RLS Role definition used:

     

    You can even merge the RLS table and the Staff Department table into one and apply RLS on it.

    Here is the Link to the file I used: Dynamic RLS for users based on a column value with non-unique values.pbix

     

    Did I answer your question? Mark my post as a solution!