0
votes

I am working on PowerBI to set up a ROW-LEVEL SECURITY. In my Power BI report, I want to limit the user to see data that they are supposed to See.

Name     Email              Country    Business unit
User 1   [email protected]    Sweden     xxx
User 2   [email protected]    Finalnd    yyy
User 3   [email protected]    Denmark    yyy
User 4   [email protected]    Sweden     cxc
User 5   [email protected]    Denmark    cxcx
User 6   [email protected]    Sweden     ggg

So If a User login and if his/her Country is Sweden, he/she should see the data where the Country Code is Sweden

Expected Result for a User where the Country code is "Sweden"

Name     Email              Country    Business unit
User 1   [email protected]    Sweden     xxx
User 4   [email protected]    Sweden     cxc
User 6   [email protected]    Sweden     ggg

Instead of any Hardcode values, I want to build it dynamically.

I have created a Separated table where I am fetching all the unique Country Names and created relationships between that table. After that, I am trying the following queries but it is just showing one record instead of the Country Code

[Email] = USERPRINCIPALNAME()

Any Idea what I am doing wrong and how it fix it?

Please show your tables and relationships. Applying the [Email] = USERPRINCIPALNAME() RLS filter on a table (Email,Country) that flows filters to the Country table is the right approach.David Browne - Microsoft