Forum Discussion

campelliann's avatar
campelliann
Icon for Post Patron rankPost Patron
4 years ago

Row Level Security - best approach?

Hi there,

 

So I have this situation where I will have 10-20 roles to manage in PowerBI.  There will be 10 tables or so to filter for each role and I am not able to easily create a Single "Role Table" that spreads the filter across the model without creating ambiguity.  I have thought on these possibilities:

 

1) Doing "manual" RLS creating the roles with the filters in the standard way.

2) Creating various Role Tables in the model, to minimize the number of Tables I ll have to filter in the modeling/RLS section

3) I also thought something of creating one role, and with SWITCH/selectedValue on email measure, I would do the filter. SWitch( true() , mail = john@complany, "value1", etc.). Dont know if this would be bad in terms of performance though..
Thanks!

2 Replies

  • Keep in mind that you can have multiple RLS rules for the same person. More permissive rules will override more restrictive rules.

  • Anonymous's avatar
    Anonymous
    Not applicable

    Hi campelliann,

    In fact, RLS and filters work on different levels, you can't use the selection from the slicer to dynamic effect the RLS.

    Notice: the data level of power bi(from parent to child level)

    Database(external) -> query table(query, custom function, query parameters) -> data model table(table, calculate column/table,RLS) -> data view with virtual tables(measure, visual, filter, slicer)

    Regards,

    Xiaoxin Sheng