Forum Discussion
Filter Selections based on userprincipalname
Hi
I've a slicer that has selection of departments. So, I want to limit selection of departments based on the user logging in.
| User | Department |
| [email protected] | Marketing |
| [email protected] | Sales |
| [email protected] | Call Center |
so if the user logging in was [email protected], then the user should see in the slicer ONLY Sales.
thanks in Advance
- Anonymous4 years ago
Hi Anonymous,
I'd like to suggest you refer to Gilbert's blog to know how to use RLS with username, then you can simply create a dynamic role based on the username and it will be interacting with the current user.
Xiaoxin Sheng
2 Replies
- amitchandak
Super User
Anonymous , Create a role
[User] = userprincipalname()
make sure this table is joined with sales.
How to use Row Level Security (RLS): https://youtu.be/NfdIA0uS6Nk
- AnonymousNot applicable
Hi Anonymous,
I'd like to suggest you refer to Gilbert's blog to know how to use RLS with username, then you can simply create a dynamic role based on the username and it will be interacting with the current user.
Xiaoxin Sheng