• Skip to main content
  • Skip to footer

Curbal

Learn how to grow your business with your data and Power BI

  • Resources
    • DAX Glossary
    • Download Center
    • Template Apps
    • Data Stories Gallery
    • Solution Gallery
  • Courses
    • Introduction to Power BI – FREE Online course
    • Power Query Online Training for Power BI
    • M Language Online Course: The unofficial and Practical Reference Guide
  • Blog
  • Shop
    • Courses
    • Swag
    • Downloads
    • Donations
  • Cart
  • Register/ Log In
    • Become a Member
    • Log In
    • My account
    • My Courses
  • Contact
You are here: Home / CM Tooltip Glossary Pro+ / PARALLELPERIOD

PARALLELPERIOD

posted on April 20, 2018

« Back to Glossary Index

Syntax

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

Tutorial with example

In today’s video, I will go through the DAX function PARALLELPERIOD. This function allows you to go back to the entire previous period from the current one.

Download example file:

Not available

Remarks

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.

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.

The interval parameter is an enumeration, not a set of strings; therefore values should not be enclosed in quotation marks. Also, the values: year, quarter, month should be spelled in full when using them.

The result table includes only dates that appear in the values of the underlying table column.

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.

This DAX function is not supported for use in DirectQuery mode.

Was this helpful?
[Total: 0    Average: 0/5]
« Back to Index

Reader Interactions

Let us know your thoughts... Cancel reply

Footer CTA

Join our community of +12,500 professionals

Become a Member

Subscribe to YouTube

About us

Curbal AB
Kopparbergsvägen, 6
722 13 – Västerås
Sweden

OrgNo:5569680852 | VAT:SE556968085201

 

Location:

© Copyright 2014-2019 · Curbal AB · All Rights Reserved · Privacy Policy · Terms of Service · Refund Policy · Log In