I have scenario where I have to filter sales for last 3 months based on MTD of current Month.
Ex: If Selected Month is March which has maximum date 11th (11-Mar-2021) . I'll need to calculate for Last 3 months excluding current Month i.e. Till 11th in each of Feb 2021 ,Jan 2021,Dec 2020.
I see that following can be achieved using time intelligence for previous month. Can anyone suggest how to filter MTD with respect to other months as well
3Month MTD Test =
CALCULATE(SUM([Sales]), DATESINPERIOD('Date_Dim'[Date],LASTDATE(PREVIOUSMONTH(Date_Dim[Date])),-3,MONTH),Day(Date_Dimn[Date]<=DAY(TODAY()))
)