Forum Discussion
AJthacker
7 years agoNew Member
Calculation for Last month Same Period
Hi All, I am trying to calculate a measure for last month same period i.e. if today is 7.2.2019, I want to calculate sum(sales) for last month up to the 2nd day i.e. 6/2/2019. I have researched th...
- 7 years ago
Hi,
Ensure that there is a relationship between the Date column of the Main Table to the Date column of the Calendar Table. Drag the Date column from the Calednar Table to your slicer/visual and select today's date in the slicer/filter. Write this measure
Last MTD Sales = CALCULATE(Sum('Main'[Sales]),DATESBETWEEN(Dates[Date],EOMONTH(MIN(Dates[Date]),-2)+1,EDATE(MIN(Dates[Date]),-1))
Hope this helps.
MattAllington
7 years agoCommunity Champion
Try this
Formula: Last MTD Sales=
CALCULATE(
Totalmtd(dates[date],Sum('Main'[Sales]),
DATEADD( Dates[Date],-1,MONTH))