Forum Discussion
Configure Row Level Security with OR condition
- Anonymous6 years ago
Hi,
You can apply RLS to the main table (WorkLogs) instead of the RLS table and check like this:
= CONTAINS('RLSTable', 'RLSTable'[User], USERPRINCIPALNAME(), 'RLSTable'[division], 'WorkLogs'[Employee division])
|| CONTAINS('RLSTable', 'RLSTable'[User], USERPRINCIPALNAME(), 'RLSTable'[division], 'WorkLogs'[Project division])
You don't need any relations between the two tables. Caching of RLS will stop working if you have more than about 130 000 rows, but if the table is not too big it will probably work even if you exceed that number.
If performance is not good enough with the above solution, my suggestion is to add some kind of bridge table between the WorkLogs table and RLStable that connects worklog rows with rows in the RLS table.
Best Regards // Ulf
Anonymous , thank you very much, I tried again and the error does not appear, and tested as role and everything seems to work fine! My main datasource has currently 120 000 rows, but it will keep growing. Doesn't seem an issue at this time but maybe i will reconsider this.
I have exactly the same issue, and I'm not an expert on Power Bi. Would you please give me specific instructions on where would I put the above expression?