Forum Discussion
APALLIPATH
5 years agoNew Member
Previous month Target
Jan MTD Sales and Target TD is done and it worked perfectly. MTD sales is updated and the given Target for the month is taken and MTD Target is calculated by checking the calendar. But when we reache...
amitchandak
5 years agoSuper User
APALLIPATH , Please check the attached file, if that can help. It only gives MTD
Last month
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
MTD QTY forced=
var _max = today()
return
if(max('Date'[Date])<=_max, calculate(Sum('order'[Qty]),DATESMTD('Date'[Date])), blank())
//or
//calculate(Sum('order'[Qty]),DATESMTD('Date'[Date]),filter('Date','Date'[Date]<=_max))
//calculate(TOTALMTD(Sum('order'[Qty]),'Date'[Date]),filter('Date','Date'[Date]<=_max))