Forum Discussion
AsNa_92
1 year agoResolver II
User access level - Data filtering
Hi team, I'm trying to find a way to show the data in a dashboard published based on the user level. So, If the user is manager, he can see data of his team members that are reporting to him onl...
rohit1991
1 year agoSuper User
HI
This is a really common scenario in Power BI and luckily, it’s exactly what Row-Level Security (RLS) was made for!
Here’s a step-by-step way to set it up:
-
Build a User Access Table Make a table (in Excel, Power BI, or your data source) that lists each user’s email, their manager’s email, and optionally their role.
-
Create a Role in Power BI: Go to Modeling > Manage Roles. Set a DAX filter on your user table like this:[UserEmail] = USERPRINCIPALNAME() || [ManagerEmail] = USERPRINCIPALNAME
-
Test in Power BI Desktop Use “View as Role” and enter different emails to make sure it’s working as expected.
-
Publish to the Service When you publish, this security will kick in automatically, no extra setup needed.