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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Request now

Reply
Anonymous
Not applicable

DateAdd vs ParallelPeriod vs SamePeriodLastYea

I was looking for DateAdd vs ParallelPeriod vs SamePeriodLastYea

and found this one:

https://radacad.com/dateadd-vs-parallelperiod-vs-sameperiodlastyear-dax-time-intelligence-question

 

SamePeriodLastYear

Let’s start with the SamePeriodLastYear function; this function will give you exactly what it explains; same PERIOD but last year! same period; means if you are looking at data on the day level, it would be same day last year. If you are slicing and dicing in a month or quarter level; this would give you the same month or quarter last year. You can use the function simply just by providing a date field:

SamePeriodLastYear(<date field>)

SamePeriodLastYear returns the equivalent period to the filter context from last year. for 1st of Sep 2006, it will return date period of 1st of Sep 2005. For Q4 of 2006 it will return Q4 of 2005. If filter context is in DAY level; it will return the same DAY last year, if the filter context is in Month level, it will return same Month last year

 

 

ParallelPeriod

ParallelPeriod is another function that gives you the ability to get the parallel period to the current period. You can navigate to periods in the past or future. you need three parameters for this function:

ParllelPeriod(<date field>, <number of intervals>, <interval>)

You can choose the interval to be Month, Quarter, or Year. and the number of intervals can be negative (to go to past), or positive (to go to the future)

 

ParallelPeriod gives the result of a period parallel to this period (in the past or future), which is statically determined in the Interval parameter; Can be Month, Quarter, or Year

 

What is the difference between SamePeriodLastYear and ParallelPeriod?

The first difference is that ParallelPeriod gives you the option to go as many as intervals you want back or forward. If you want to get the sales for last months; then ParallelPeriod is your friend. for calculating the sales of 2 years ago, then ParallelPeriod is your friend.

Dynamic Period is another difference between these two functions

1 ACCEPTED SOLUTION
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

The best understanding is that SamePeriodLastYea Function is the same this formula:

DATEADD(dates, -1, year)

As you can see, "The first difference is that ParallelPeriod gives you the option to go as many as intervals you want back or forward."

and it couldn't be modified, so for their difference, it is the same between DATEADD(dates, -1, year) and ParallelPeriod.

For example:

For Q4 of 2006 SamePeriodLastYea will return Q4 of 2005, but ParallelPeriod (year) will return all 2005.

3.JPG

 

Best Regards,

LIN

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

1 REPLY 1
v-lili6-msft
Community Support
Community Support

hi, @Anonymous 

The best understanding is that SamePeriodLastYea Function is the same this formula:

DATEADD(dates, -1, year)

As you can see, "The first difference is that ParallelPeriod gives you the option to go as many as intervals you want back or forward."

and it couldn't be modified, so for their difference, it is the same between DATEADD(dates, -1, year) and ParallelPeriod.

For example:

For Q4 of 2006 SamePeriodLastYea will return Q4 of 2005, but ParallelPeriod (year) will return all 2005.

3.JPG

 

Best Regards,

LIN

Community Support Team _ Lin
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
November Power BI Update Carousel

Power BI Monthly Update - November 2025

Check out the November 2025 Power BI update to learn about new features.

Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors
Top Kudoed Authors