Forum Discussion
Power BI Embedded Row-Level Security for Multiple values of single attribute
Hello,
There is no need to manage any OR conditions as that is why you have the Roles_Departments mapping table there for.
E.g. Your Roles_Departments mapping tables might have values like -
Role_Id | Department_Id
R1 | D1
R1 | D2
R2 | D3
R3 | D2
R3 | D3
Now, if you pass the particular Role_Id you need via USERNAME(), the related departments will get filtered which will inturn all the related tables showing data only related to those filtered departments.
Hope, this will give you more clarity. If you still have any query, please do write back.
Thanks vinaypugalia, i got your point. My previous reply was based on the comment by v-lvzhan-msft. However, I don't have roles in my scenario. Also, such table needs to be modified everytime when the user to depratment mapping changes?
- vinaypugalia9 years agoResolver I
Hello,
I do understand that you currently do not have ROLES in your application, but you need to bring in this concept to get rid of multiple OR conditions. Also, if there is any change in User-Department mappings, any solution to come up with will need a change and having a mapping table for it will be the most scalable of them.