Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more
Hi All,
I am using the following formula to calcuate LY MTD
Solved! Go to Solution.
Hi , @fahadnazir
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.
You can try like
last year MTD Sales = CALCULATE(SUM([Total Inv Sales]),DATESMTD(dateadd('DateDim'[Date],-12,MONTH)))
MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD('Date'[Date]))
last MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-1,MONTH)))
last MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-1,MONTH))))
last year MTD Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(dateadd('Date'[Date],-12,MONTH)))
last year MTD (complete) Sales = CALCULATE(SUM(Sales[Sales Amount]),DATESMTD(ENDOFMONTH(dateadd('Date'[Date],-12,MONTH))))
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
Hi , @fahadnazir
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.
Hi,
Demo is not available can you please reload it
Check out the November 2025 Power BI update to learn about new features.
Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!