Forum Discussion
Lock Slicers for Different Users
Thanks for the response vanessafvg . More so from a user experience point of view, row level security sounds too extreme for this case. I purely want to set the slicers to certain value depending on the audience - is what I'm asking for possible?
I think its be possible;
First off you would need a list of users and what department they map to. Using the the userprincipal () function to bring back that user name and then map it to which department.
Then you could probably create a switch statement with a dynamic slicer to return the value dependent on department.
userprincipal
https://dax.guide/userprincipalname/
switch()
https://docs.microsoft.com/en-us/dax/switch-function-dax
https://towardsdatascience.com/using-slicers-for-dynamic-chart-adjustment-in-powerbi-47d0ea1b839e