DEV Community

Cover image for Power BI: How to Create Dynamic Show Hide Slicer Panel
Luca Liu
Luca Liu

Posted on • Updated on

Power BI: How to Create Dynamic Show Hide Slicer Panel

Introduction:

Optimizing space and enhancing usability are vital aspects of designing Power BI dashboards. In this article, we'll explore a versatile technique for creating a Dynamic Show Hide Slicer Panel in Power BI. This technique allows users to switch the visibility of slicer panels as needed, optimizing space and improving dashboard usability. By leveraging Power BI features such as shapes, bookmarks, and buttons, we'll demonstrate how to empower users to dynamically show or hide slicer panels, ensuring a streamlined and user-friendly dashboard experience.

Step-by-Step Guide:

1. Start by Creating a Rectangular Shape and Positioning Filters:

Start by creating a rectangular shape (Insert - Shapes) and positioning two filters above it in the dashboard canvas (make sure Product Slicer and Country Slicer are above on the Shape in Selection panel). and then Group these three elements together to simplify management (select all of them and press Ctrl+G).

Image description

2. Create Buttons and Bookmarks:

Next, add two buttons to the dashboard and label them as "Show Filter" and "Hide Filter" respectively. These buttons will serve as triggers to control the visibility of the navigation panel.

Now, create two bookmarks—one for showing the filter panel and another for hiding it. Open the bookmarks panel to rename and rename them accordingly.

Image description

3. Update Bookmark:

Select the filter group and disable the data option and choose the Selected visuals option. This ensures that only the selected visual (i.e., the filter group) will be displayed when the bookmark is applied, and then Update the "Show Filter" bookmark.

Image description

Similarly, update the "Hide Filter" bookmark by making the filter group invisible. Disable the data option and choose the Selected visuals option and then Update the Bookmark.

Image description

4. Set Button Actions:

Configure the actions for the "Show Filter" and "Hide Filter" buttons. In the format panel, open the action settings and set the type to Bookmark.

Assign the corresponding bookmarks to each button—set "Show Filter" bookmark for the "Show Filter" button.

Image description

and set "Hide Filter" bookmark for the "Hide Filter" button.

Image description

Conclusion

The Dynamic Show Hide Slicer Panel technique offers a straightforward solution for managing space constraints and improving dashboard usability in Power BI. By enabling users to switch the visibility of slicer panels based on their preferences, this approach enhances user control and flexibility. Whether it's showing or hiding slicer panels dynamically, this technique empowers users to optimize space utilization and create a streamlined dashboard interface for efficient data exploration and analysis.


Explore more

Thank you for taking the time to explore data-related insights with me. I appreciate your engagement.

🚀 Connect with me on LinkedIn

🎃 Connect with me on X

🌍 Connect with me on Instagram

Top comments (0)