## How does the PARALLELPERIOD function (DAX) work?

The PARALLELPERIOD function (DAX) returns a table that contains a column of dates that represents a period parallel to the dates in the specified dates column, in the current context, with the dates shifted a number of intervals either forward in time or back in time.

## PARALLELPERIOD Formula Syntax

PARALLELPERIOD(
<dates>,<number_of_intervals>,<interval>
)

## How do you use the PARALLELPERIOD function?

This function takes the current set of dates in the column specified by dates, shifts the first date and the last date the specified number of intervals, and then returns all contiguous dates between the two shifted dates. If the interval is a partial range of month, quarter, or year then any partial months in the result are also filled out to complete the entire interval.

## Related Support Forum Posts

Time comparisons – PREVIOUSMONTH, PARALLELPERIOD
How And When To Use PARALLELPERIOD In Power BI – DAX Function Review
Calculate Qty Sold Month by Month by account/product/colour/price

## Considerations when using the PARALLELPERIOD function

The dates argument can be any of the following:

• A reference to a date/time column,
• A table expression that returns a single column of date/time values,
• A Boolean expression that defines a single-column table of date/time values.

If the number specified for number_of_intervals is positive, the dates in dates are moved forward in time; if the number is negative, the dates in dates are shifted back in time.

## Formula examples using the PARALLELPERIOD function

=CALCULATE(SUM(InternetSales_USD[SalesAmount_USD]), PARALLELPERIOD(DateTime[DateKey],-1,year))

=CALCULATE( COUNT(CRASH_DATA_T[CASENUMBER]), PARALLELPERIOD(Calc_Date_T[CRASH_DATE], -1,YEAR))

= CALCULATE(SUM(FactSales[Net_Sales]),PARALLELPERIOD(DimCalendar[Date_Id],-1,YEAR))

## Related Course Modules 