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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

SWITCH function MTD / YTD applied to multiple measures

Dear Community, 

I am trying to set a switch function between month and year that would applied to graph containing :

- Sales TY

- Sales LY

- Sales TY vs LY variance %

 

How can I create a function that allows the swithc to apply to these multiple measures?

Thank you in advance for your help.

Kind regards

1 ACCEPTED SOLUTION
Anonymous
Not applicable

Hello @amitchandak  , thank you for your kind help but this is not exactly what I needed. I wanted to have a sales measure with MTD / YTD switch, that would apply to my visualisations that are including at the same  time Sales TY, LY and TY vs LY. I managed to solve it. Thanks a lot! 

View solution in original post

5 REPLIES 5
Jihwan_Kim
Super User
Super User

Hi, @Anonymous 

Please check the below picture and the sample pbix file's link down below.

All measures are in the sample pbix file.

In this case, I suggest creating a separate table for a slicer, like the below picture.

 

Picture1.png

 

https://www.dropbox.com/s/gl2m0y0zid9eohw/mb.pbix?dl=0 

 

 

Hi, My name is Jihwan Kim.

 

If this post helps, then please consider accept it as the solution to help other members find it faster, and give a big thumbs up.

 

Linkedin: linkedin.com/in/jihwankim1975/

Twitter: twitter.com/Jihwan_JHKIM


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Click here to schedule a short Teams meeting to discuss your question.
Anonymous
Not applicable

Hello @Jihwan_Kim , thank you for your kind help but this is not exactly what I needed. I wanted to have a sales measure with MTD / YTD switch, that would apply to my visualisations that are including at the same  time Sales TY, LY and TY vs LY. I managed to solve it. Thanks a lot! 

amitchandak
Super User
Super User

@Anonymous , Seem like you are lloking for measure slicer

My video: https://www.youtube.com/watch?v=b9352Vxuj-M

 

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

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
Anonymous
Not applicable

Hello @amitchandak  , thank you for your kind help but this is not exactly what I needed. I wanted to have a sales measure with MTD / YTD switch, that would apply to my visualisations that are including at the same  time Sales TY, LY and TY vs LY. I managed to solve it. Thanks a lot! 

How did you solve it ?

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.