Forum Discussion

shaykoooo's avatar
shaykoooo
Helper I
8 years ago
Solved

PARALLELPERIOD vs DATEADD

Hi, I would like to understand the difference between the two. Today is March 8th, 2018, so DATEADD ( 'Date'[Date], -1, YEAR ) ) would return the sales of last year but only from 1/1/2017 through Mar...
  • Greg_Deckler's avatar
    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.

  • Greg_Deckler's avatar
    Greg_Deckler
    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.