Hi
i have following to calculate MTD this year, which is fine
2017SalesMTD:=calculate(sum(SALES2017[SALES]),DATESMTD(Table1[Date]))
but cant get MTD last year, i tried below, result is not getting
2016SalesMTD:=calculate(sum(SALES2017[SALES]),
filter(all(Table1),
Table1[Date]<=max(Table1[Date])
&&Table1[Year]=2016
&&Table1[MonthNo]=max(Table1[MonthNo])))
Table1 is calendar table with 2016 & 2017 dates
i have following to calculate MTD this year, which is fine
2017SalesMTD:=calculate(sum(SALES2017[SALES]),DATESMTD(Table1[Date]))
but cant get MTD last year, i tried below, result is not getting
2016SalesMTD:=calculate(sum(SALES2017[SALES]),
filter(all(Table1),
Table1[Date]<=max(Table1[Date])
&&Table1[Year]=2016
&&Table1[MonthNo]=max(Table1[MonthNo])))
Table1 is calendar table with 2016 & 2017 dates