Forum Discussion
PARALLELPERIOD vs DATEADD
- 8 years ago
The PARALLELPERIOD function is similar to the DATEADD function except that PARALLELPERIOD always returns full periods at the given granularity level instead of the partial periods that DATEADD returns. For example, if you have a selection of dates that starts at June 10 and finishes at June 21 of the same year, and you want to shift that selection forward by one month then the PARALLELPERIOD function will return all dates from the next month (July 1 to July 31); however, if DATEADD is used instead, then the result will include only dates from July 10 to July 21.
- 8 years ago
What should happen is that the PARALLELPERIOD function would return all dates from the next month (July 1 to July 31) but DATEADD should only July 1 to July 21.
Hi,
What should the result be when the date is March 31? What dates should the formula consider for the previous month?
Hello
I would always like to see the result considering the current date, that is, today is March 29, so I have sales closed until March 29, and I would like to also have sales until February 29 to compare them and know how we are in relation to the same period of the previous month.
When the date is March 31 I would have to compare it with the value of February 28, current month compared with the previous month.
- Ashish_Mathur7 years ago
Super User
Hi,
Try this measure
=CALCULATE(SUM(Data[Amount]),DATESBETWEEN(Calendar[Date],EOMONTH(MIN(Calendar[Date]),-2)+1,EDATE(MIN(Calendar[Date]),-1)))
I have assumed that you will select a particular date in a slicer/filter such as March 30, 2019.
Hope this helps.