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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

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...

 

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...

 

Many thanks @amitchandak !

Helpful resources

Announcements
LearnSurvey

Fabric certifications survey

Certification feedback opportunity for the community.

April Fabric Community Update

Fabric Community Update - April 2024

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