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
Benedikt42
Frequent Visitor

Show and hide slicers with a click on a button

Hello everyone,

 

I am working in Power BI Desktop and would like to have several slicers on one page.

I would like to be able to show and hide the slicers with a click on a button.

For example, if I click on the "Country" button, the slicer should be displayed with a list of countries so that I can then select one or more countries as a filter. If I click on the "Country" button again, the slicer with the country list should be hidden.
The countries that I have selected should remain.


I would then like to have a separate button for each slicer that shows or hides the corresponding slicer.

 

Is this possible and if so, how?

Thanks in advance for your help

Ben

 

1 ACCEPTED SOLUTION

Hi @Benedikt42 ,

 

To close it again you need to have another button that takes the place of the first button when it's open, so you would have 2 buttons that are alternanting one that has the action to open bookmark and the other to the close.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



View solution in original post

6 REPLIES 6
MFelix
Super User
Super User

Hi @Benedikt42 ,

 

For this you need to create bookmarks:

https://learn.microsoft.com/en-us/power-bi/create-reports/desktop-bookmarks?tabs=powerbi-desktop

 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



Hi @MFelix,
Thank you for your reply.

I tried to include bookmarks and hide the corresponding slicers in the selection.
Then I added an action to the buttons so that the corresponding bookmark is opened.
However, it seems that Power BI does not save my hiding actions, so I have to hide the slicers every time.

How can I save the selection in each bookmark?

 

Thanks for your help and best regards

 

Ben

I had the order wrong when creating the bookmarks and selecting for hiding. It works now.

 

But is there a way to make the slicer close again when clicking the same button?

Hi @Benedikt42 ,

 

To close it again you need to have another button that takes the place of the first button when it's open, so you would have 2 buttons that are alternanting one that has the action to open bookmark and the other to the close.


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



I have implemented it this way and it works fine.

 

Is there also a way that when I click one of the buttons, a predefined filter is applied that stops when I click another button?

One of the options for the bookmark is to keep the data if you have it active tye filters will be applied every time you select the buttons. 


Regards

Miguel Félix


Did I answer your question? Mark my post as a solution!

Proud to be a Super User!

Check out my blog: Power BI em Português



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.