Forum Discussion
PBSuper
9 years agoFrequent Visitor
MTD Previous
I am using SAMEPERIODLASTYEAR for my MTD Last Year calculation, however it returns Sales for the entire month of the previous year. So if I am reporting MTD sales for 17-08-2017, the MTD Last Year I ...
PBSuper
9 years agoFrequent Visitor
I have already trimmed my calendar dimension in my tabular to not include any future dates. My fact is not going to have future sales so I probably don't have to worry about that. Doing this has not fixed my problem.
v-jiascu-msft
Microsoft Employee
9 years agoHi PBSuper,
Maybe it's something about context. Which table is the column date of the report from? Is it from table "Calendar"?
This formula works fine in my test:
TotalMTDLastYear = TOTALMTD ( SUM ( Sales[Quantity] ), SAMEPERIODLASTYEAR ( 'Calendar'[Date] ) )
Best Regards!
Dale