Forum Discussion
Anonymous
6 years agoNot applicable
Problem with LY MTD Calculations
Hi All, I am using the following formula to calcuate LY MTD LY MTD Inv Sales = CALCULATE( [Total Inv Sales], DATESMTD( SAMEPERIODLASTYEAR(DimDate[Date]) ) ) Assuming today is 25th Mar 2020...
- 6 years ago
Hi , Anonymous
Try measures as below:
LY MTD Inv Sales = CALCULATE(SUM('Table'[Value]), FILTER(DATESMTD( SAMEPERIODLASTYEAR('Date'[Date]) ),MONTH([Date] )<MONTH(TODAY()) || (MONTH([Date] )=MONTH(TODAY())&&day([Date] )<=day(TODAY()))))Here is a demo.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
Anonymous
6 years agoNot applicable
Thanks for responding Amit.
I am afraid i cant follow the your answer.
Isnt there an easy way of filtering out the unwanted days of LY MTD (26-31st march 2019) by may be flagging dates in calendar table ?
Thx
Fahad
v-easonf-msft
Community Support
6 years agoHi , Anonymous
Try measures as below:
LY MTD Inv Sales = CALCULATE(SUM('Table'[Value]), FILTER(DATESMTD( SAMEPERIODLASTYEAR('Date'[Date]) ),MONTH([Date] )<MONTH(TODAY()) || (MONTH([Date] )=MONTH(TODAY())&&day([Date] )<=day(TODAY()))))
Here is a demo.
Best Regards,
Community Support Team _ Eason
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.
- Anonymous6 years agoNot applicable
Bravo v-easonf-msft
Got what i wanted !!!!
- Anonymous4 years agoNot applicable
Hi,
Demo is not available can you please reload it