Home > Blockchain >  Can Someone please Explain this Dax Expression?
Can Someone please Explain this Dax Expression?

Time:10-06

mYear = SWITCH(MONTH(TODAY()),1,YEAR(TODAY())-1,YEAR(TODAY()))

mMonth = SWITCH(MONTH(TODAY()),1,12,MONTH(TODAY())-1)

mMonth_name = FORMAT(DATE(1,[mMonth],1),"MMM")

This measure is used in another expression or formula to get result for only previous month. Please what can i change in each measure to make me get values for YTD? Thanks to you all, for the support as always

CodePudding user response:

Learn all about SWITCH() in the official docs: (2 min to read)

https://learn.microsoft.com/en-us/dax/switch-function-dax

  • Related