Forum Discussion
Anonymous
4 years agoNot applicable
MTD for Previous period
If the current MTD is the 1-28th of May, I would like to be able to see the MTD sales for the same period for the 1st-28th of January or any other month. Greatly appreciate it if someone can ...
- 4 years ago
Hi, Anonymous ;
You could create a measure such as:
measure = CALCULATE(SUM('Fact'[amount]),FILTER('Table',DAY([Date])>=1&& DAY([Date])<=DAY(TODAY())))I tested it, when today is 2022-6-1.so the result is:
when change the today is 5-28.
Best Regards,
Community Support Team _ Yalan Wu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
PriyasonP
4 years agoRegular Visitor
Hi Ganethra,
I believe you are trying to calculate the previous month's sales that's -1 from the current selection. I think PARALLELPERIOD and DATEADD should help calculate previous month sales.
Sales Previous Month =
CALCULATE([Total Sales],
PARALLELPERIOD('Calendar Table'[Date],-1, MONTH))
CALCULATE([Total Sales],
PARALLELPERIOD('Calendar Table'[Date],-1, MONTH))
Let me know if this helps!