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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

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
November Power BI Update Carousel

Power BI Monthly Update - November 2025

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

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors