Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.
I've been poking around data permissions in PowerBI and I know I can limit visibility to some data based on who's looking, but the tool to limit seems blunt. Examples show that my email might limit me from seeing all the financial data, but what if I'd like to see some subset that's relevant to me?
The situations I'm in is that I'd like to create an HR dashboard and have it so that managers can see their staff, but no one else.
Is this possible?
Solved! Go to Solution.
HI @AlejandroPNW ,
For your requirement, you can consider to create a user role table for detail record mapping.(enable RLS filter on user role level)
Current dynamic RLS setting: username function -> User table(RLS filter) -> other tables.
Modified dynamic RLS setting: username function -> User table -> user role table(RLS filter) <- other tables.
After these steps, you can use username to find out correspond user role then apply filter on that table based on relationships.
Sample:
User
ID | Name | Department |
1 | abc | A |
2 | ade | A |
3 | Test | A |
4 | bcd | B |
User role
ID | Role |
1 | User |
2 | User |
3 | Manager |
4 | Manager |
Logic: if user role is user, then filter on username; if current user is manager, filter on department level.
Regards,
Xiaoxin Sheng
HI @AlejandroPNW ,
For your requirement, you can consider to create a user role table for detail record mapping.(enable RLS filter on user role level)
Current dynamic RLS setting: username function -> User table(RLS filter) -> other tables.
Modified dynamic RLS setting: username function -> User table -> user role table(RLS filter) <- other tables.
After these steps, you can use username to find out correspond user role then apply filter on that table based on relationships.
Sample:
User
ID | Name | Department |
1 | abc | A |
2 | ade | A |
3 | Test | A |
4 | bcd | B |
User role
ID | Role |
1 | User |
2 | User |
3 | Manager |
4 | Manager |
Logic: if user role is user, then filter on username; if current user is manager, filter on department level.
Regards,
Xiaoxin Sheng
Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City
Check out the April 2024 Power BI update to learn about new features.
User | Count |
---|---|
113 | |
99 | |
80 | |
70 | |
59 |
User | Count |
---|---|
149 | |
114 | |
107 | |
89 | |
67 |