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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
AleFVG
Helper I
Helper I

Bar Chart with switch on/off

Hello!

I have these two measures:
Sales 2019 - MTD
Sales 2020 - MTD
I have created a bar chart where both measures are displayed. I would like to have the possibility to activate / deactivate the visualization in the graph of the Measure Sales 2019 - MTD, with a switch on / off button.
It's possible?

 

thanks.

1 ACCEPTED SOLUTION
amitchandak
Super User
Super User

@AleFVG , On way is bookmark. Have two visual one without 2019 measure and one with it and use the button to control it

 

https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

 

Another is have slicer and then check for selected value

if(isfiltered(slicer[slicer]) && selectedvalues(slicer[slicer]) ="Sales 2019 - MTD",[Sales 2019 - MTD], blank())

 

refer measure slicer approch too

https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

 

Share with Power BI Enthusiasts: 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

2 REPLIES 2
amitchandak
Super User
Super User

@AleFVG , On way is bookmark. Have two visual one without 2019 measure and one with it and use the button to control it

 

https://radacad.com/bookmarks-and-buttons-making-power-bi-charts-even-more-interactive

 

Another is have slicer and then check for selected value

if(isfiltered(slicer[slicer]) && selectedvalues(slicer[slicer]) ="Sales 2019 - MTD",[Sales 2019 - MTD], blank())

 

refer measure slicer approch too

https://radacad.com/change-the-column-or-measure-value-in-a-power-bi-visual-by-selection-of-the-slic...
https://community.powerbi.com/t5/Desktop/Slicer-MTD-QTD-YTD-to-filter-dates-using-the-slicer/td-p/50...

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

Many thanks @amitchandak !

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

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

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors