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.
v-easonf-msft
6 years agoCommunity Support
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
Bravo v-easonf-msft
Got what i wanted !!!!