Forum Discussion
filter data based on user email
I would like to show only the data related to the viewer email, from what I read around it should be feasable in Power BI,
however I can't find a way.
I have already all the data in my data set, with 2 kind of users, employees and DMs, I would like to show different data (even in different pages)
| EMP CODE | EMP AREA | EMP EMAIL | DM EMAIL |
| 123 | AAA | [email protected] | [email protected] |
| 456 | BBB | [email protected] | [email protected] |
EMP AREA connects this table to all my other data (1:many relationships)
Anyone could help?
Thanks in advance
- Anonymous2 years ago
Hi Anonymous ,
As Greg_Deckler said, to verify that your configured rls is in effect, just select view as. The reference is below:
Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
4 Replies
- Greg_DecklerCommunity Champion
Anonymous Yes, this is done by creating an RLS rule on the table and using USERPRINCIPALNAME such as:
[EMAIL] = USERPRINCIPALNAME()
- AnonymousNot applicable
Many thanks!
I've done the following and seems to work
But is there any way to test this?
I've tried "View as" but whatever I select the data doesn't seem to be filtered
- Greg_DecklerCommunity Champion
Anonymous So when viewing as, you need to select the role and then "Other user" and type in the email address of the other user who you want to impersonate.
- AnonymousNot applicable
Hi Anonymous ,
As Greg_Deckler said, to verify that your configured rls is in effect, just select view as. The reference is below:
Best Regards,
Adamk KongIf this post helps, then please consider Accept it as the solution to help the other members find it more quickly.