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.
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.
- shaykoooo8 years ago
Helper I
And what if the period was from June 1 through June 21?- Greg_Deckler8 years ago
Community Champion
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.
- Anonymous7 years agoNot applicable
Hello
Sorry raise the topic again, but I have a problem here, perhaps because of the month of February has fewer days than other months.
Being today 26 / March I want to compare sales from March 1 to March 26 with sales from February 1 to February 26
Apparently simple, but in applying the measurements I do not see the correct result.
The table shows me the sales from January 30 to February 22 using DATEADDWhile using PARALLELPERIOD shows me the sales from 01 / Feb to 22 / Feb
The problem is that I have sales on the 25th and 26th of February that are not considered by the measures