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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

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/

 

 

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/

 

 

Helpful resources

Announcements
Europe Fabric Conference

Europe’s largest Microsoft Fabric Community Conference

Join the community in Stockholm for expert Microsoft Fabric learning including a very exciting keynote from Arun Ulag, Corporate Vice President, Azure Data.

Power BI Carousel June 2024

Power BI Monthly Update - June 2024

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

RTI Forums Carousel3

New forum boards available in Real-Time Intelligence.

Ask questions in Eventhouse and KQL, Eventstream, and Reflex.