Forum Discussion
Row Level Security - Measures vs Calculated Columns
Hi,
Lets say I have a users table, with emails and access, and apply row level security based on the email.
When a user enters the dashboard, this user table has only one row.
With test as role I tried hasonevalue (email) on a measure, and the result is 1 - the expected result. But if I use hasonevalue or countrows on calculated column off any model given table, I will get false and 30 rows, the number of users.
Any explanation?
Thanks
- Anonymous3 years ago
Hi campelliann ,
According to your description, you can apply dynamic row-level security by making use of the username() or userprincipalname() DAX functions since there is email field. You can refer the following links to get it.
Row-level security (RLS) with Power BI
Dynamic Row Level Security with Power BI Made Simple - RADACAD
Best Regards
Hi there and thank you for your message
My main point would be about the difference of results between a measure and calculated column. It seems that on a calculated column power bi does not identify the row level security if I use the countrows, only on measures..
2 Replies
- AnonymousNot applicable
Hi campelliann ,
According to your description, you can apply dynamic row-level security by making use of the username() or userprincipalname() DAX functions since there is email field. You can refer the following links to get it.
Row-level security (RLS) with Power BI
Dynamic Row Level Security with Power BI Made Simple - RADACAD
Best Regards
- campelliann
Post Patron
Hi there and thank you for your message
My main point would be about the difference of results between a measure and calculated column. It seems that on a calculated column power bi does not identify the row level security if I use the countrows, only on measures..