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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
Anonymous
Not applicable

undefined

how to dynamically show and hide slicers using dax

2 ACCEPTED SOLUTIONS
amitchandak
Super User
Super User

@Anonymous , You can show hide using bookmarks.

 

With DAX you have to use some shape on top of it and play with color, based on some conditions you can make it transparent, refer to blog from Matt

https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

v-yohua-msft
Community Support
Community Support

Hi, @Anonymous 

DAX itself does not directly support showing or hiding slicers. As amitchandak explains, you can use bookmarks and buttons to create snapshots of the different states in your report, and then toggle those states through the interaction of buttons or other visuals. Here are my additions:

 

Start by selecting Bookmark on the Vie page of the main page

 2.png

Then create two bookmarks in different states, create two buttons, and bind Bookmark1 and Bookmark2 to the two buttons

 3.png

In Bookmark2, we hide the table. Then ctrl+click the button to jump to Bookmark2, and click the second one to jump back to Bookmark1

 1.1.png

 1.png

 

 

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

View solution in original post

2 REPLIES 2
v-yohua-msft
Community Support
Community Support

Hi, @Anonymous 

DAX itself does not directly support showing or hiding slicers. As amitchandak explains, you can use bookmarks and buttons to create snapshots of the different states in your report, and then toggle those states through the interaction of buttons or other visuals. Here are my additions:

 

Start by selecting Bookmark on the Vie page of the main page

 2.png

Then create two bookmarks in different states, create two buttons, and bind Bookmark1 and Bookmark2 to the two buttons

 3.png

In Bookmark2, we hide the table. Then ctrl+click the button to jump to Bookmark2, and click the second one to jump back to Bookmark1

 1.1.png

 1.png

 

 

 

How to Get Your Question Answered Quickly 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

 

amitchandak
Super User
Super User

@Anonymous , You can show hide using bookmarks.

 

With DAX you have to use some shape on top of it and play with color, based on some conditions you can make it transparent, refer to blog from Matt

https://exceleratorbi.com.au/show-or-hide-a-power-bi-visual-based-on-selection/

 

 

Full Power BI Video 20 Hours YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code FABINSIDER for a $400 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

Check out the February 2025 Power BI update to learn about new features.

March2025 Carousel

Fabric Community Update - March 2025

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