Hello guys,
I’ve got a measure, that calculates some YTD values using TOTALYTD.
Value, YTD:=TOTALYTD([Value];’Calendar'[Date])
I would like to calculate this YTD value for the previous month.
Value, YTD, PrevM:=CALCULATE([Value, YTD];PREVIOUSMONTH(‘Calendar'[Date]))
However, if I am now in January 2017, it will calculate the December 2016 YTD value.
How do I set the calculation for the YTD value previous month, so it only calculates it only if the previous month is in the same year?
I’ve got a measure, that calculates some YTD values using TOTALYTD.
Value, YTD:=TOTALYTD([Value];’Calendar'[Date])
I would like to calculate this YTD value for the previous month.
Value, YTD, PrevM:=CALCULATE([Value, YTD];PREVIOUSMONTH(‘Calendar'[Date]))
However, if I am now in January 2017, it will calculate the December 2016 YTD value.
How do I set the calculation for the YTD value previous month, so it only calculates it only if the previous month is in the same year?