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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Reply
RupeshR
Regular Visitor

How ParellelPeriod is different than SamePeriodLastYear?

Hello Team,

 

I was implementing sameperiodlastyear function in one of my requirements but later on, I tried with parellelperiod and I got the same result. 

YearMonthTotal SalesSPLY SalesPP Month
202011497231.16  
202023735749.74  
202033047077.16  
202041219314.66  
202053141818.05  
202062638686.35  
202071694440  
202083801310.64  
202092957324.63  
2020104371882.85  
2020116250205.61  
2020125294252.88  
202113279293.131497231.161497231.16
202124819830.843735749.743735749.74
202134197491.73047077.163047077.16
202142317479.911219314.661219314.66
202154184402.553141818.053141818.05
202162959186.542638686.352638686.35
202173475325.216944401694440
202185066696.843801310.643801310.64
202193538197.562957324.632957324.63
2021104817855.864371882.854371882.85
2021117416168.026250205.616250205.61
2021127463875.425294252.885294252.88

 

SPLY - Same Period Last Year -

SPLY Sales = CALCULATE([Total Sales],SAMEPERIODLASTYEAR(Calender[Date]))
 

PP- Parallel Period -

PP Month = CALCULATE([Total Sales],PARALLELPERIOD(Calender[Date],-12,MONTH))


So now I have a query if parellelperiod gives me the same values then why do we have sameperiodlastyear function where we can achieve it by parallel period?

 

Thank You in advance.

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

Hi @RupeshR ,

 

The main differences between them are as follows:

(1)SamePeriodLastYear is working based on the DYNAMIC period in the filter context.

ParallelPeriod is working STATICALLY based on the interval selected in the parameter.

(2)ParallelPeriod can go more than one interval back and forward, while SamePeriodLastYear only goes one year back.

(3)ParallelPeriod only works on month, quarter, and year.

 

For example:

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

vtangjiemsft_0-1672629677281.png

 

Please refer to the following document for more information.

https://laptrinhx.com/news/power-bi-dax-sameperiodlastyear-paralellperiod-and-dateadd-AowbRAW/

Power BI DAX: SAME PERIOD LAST YEAR, PARALELL PERIOD (databear.com)

DateAdd vs ParallelPeriod vs SamePeriodLastYear; DAX Time Intelligence Question - RADACAD

 

Best Regards,

Neeko Tang

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

3 REPLIES 3
v-tangjie-msft
Community Support
Community Support

Hi @RupeshR ,

 

The main differences between them are as follows:

(1)SamePeriodLastYear is working based on the DYNAMIC period in the filter context.

ParallelPeriod is working STATICALLY based on the interval selected in the parameter.

(2)ParallelPeriod can go more than one interval back and forward, while SamePeriodLastYear only goes one year back.

(3)ParallelPeriod only works on month, quarter, and year.

 

For example:

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

vtangjiemsft_0-1672629677281.png

 

Please refer to the following document for more information.

https://laptrinhx.com/news/power-bi-dax-sameperiodlastyear-paralellperiod-and-dateadd-AowbRAW/

Power BI DAX: SAME PERIOD LAST YEAR, PARALELL PERIOD (databear.com)

DateAdd vs ParallelPeriod vs SamePeriodLastYear; DAX Time Intelligence Question - RADACAD

 

Best Regards,

Neeko Tang

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

AlexisOlson
Super User
Super User

These aren't quite the same in general but even if they were, it's sometimes handy to have shorthands for common operations.

 

For more detail on the differences, I recommend this older post which references radacad.com.

Greg_Deckler
Super User
Super User

@RupeshR This may help explain the differences: You may find this helpful - https://community.powerbi.com/t5/Community-Blog/To-bleep-With-Time-Intelligence/ba-p/1260000


@ 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!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.