Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
shaykoooo
Helper I
Helper I

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 March 8th, 2017? Whreas PARALLELPERIOD( 'Date'[Date], -1, YEAR ) ) would return sales from 1/1/2017 through March 30th, 2017? Am I correct in both statements?
If you can refer to sales on your answer, that would be great. ie for each function, sales for what periods will I receive?

TY
2 ACCEPTED SOLUTIONS
Greg_Deckler
Super User
Super User

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

View solution in original post

11 REPLIES 11
Greg_Deckler
Super User
Super User

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...

And what if the period was from June 1 through June 21?

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.


@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
Mastering Power BI 2nd Edition

DAX is easy, CALCULATE makes DAX hard...
Anonymous
Not 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 DATEADD

While 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

 

 

 

 

Anonymous
Not applicable

Hi,

I cannot understand anything from those images.  Someone else will help you.  Sorry.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

I'll try to explain it better.
What I need is to have the sales number from Feb. 1 to Feb. 26 to show on the multiply card in conjunction with the indicator that shows sales for the current month (March 1 to March 26).
One indicator is sales of the month and the other sales in the same period of the previous month (MPMA Sales)
In the table I put the dates of sales and the three measures that I used to try to reach these numbers.
The measures that use PARALLELPERIOD AND DATEADD, -1, MONTH show the sales of the whole February month, but I only want the sales until the same day of today only that in the previous month, in the case would be until February 26.
The other measure used DATEADD, -30, DAY totals sales considering 30 days before the 26th of February and then considers and adds sales from the end of January, which does not interest me in the context I want to compare
Finally, the three measures mentioned above are inserted in the multiple card, showing the same results of the totals in the table, but none of them are showing the result that I need, which are sales for the same period of the previous month.
Updating to today's date (March 28th) I would have sales from March 1 to March 27 in a gauge and sales from Feb. 1 to Feb. 27 on one of the indicators that are detailed in the table.

Hi,

What should the result be when the date is March 31?  What dates should the formula consider for the previous month?


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/
Anonymous
Not applicable

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.

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.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Hi,

Share some data and show the expected result.


Regards,
Ashish Mathur
http://www.ashishmathur.com
https://www.linkedin.com/in/excelenthusiasts/

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

Find out what's new and trending in the Fabric Community.