Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

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.

Reply
stokidez
Helper III
Helper III

Lock Slicers for Different Users

Hi folks,

 

I have a single page dashboard which can be filtered by department. I would like, once published, to push this out to different users across an organisation, who work in different departments i.e. when Colleague A (who works in Compliance) opens the report, the report automatically filters on Compliance and the slicer is locked so cannot be changed to another department. Is this possible? Thanks! 

 

stokidez_0-1616753101815.png

 

5 REPLIES 5
kamalowfo
New Member

@stokidez hi! Have you found a solution? Would be helpful if you share the guideline to this !

best regards,
O

V-lianl-msft
Community Support
Community Support

vanessafvg
Super User
Super User

are you doing this from a security perspective or just a user experience perspective?  Have you considered row level security?

 

https://www.sqlshack.com/introduction-to-row-level-security-in-power-bi/

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




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/

https://exceltown.com/en/tutorials/power-bi/powerbi-com-and-power-bi-desktop/dax-query-language-for-...

 

switch()

https://docs.microsoft.com/en-us/dax/switch-function-dax

https://towardsdatascience.com/using-slicers-for-dynamic-chart-adjustment-in-powerbi-47d0ea1b839e

 

 

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.