Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.
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.
Year | Month | Total Sales | SPLY Sales | PP Month |
2020 | 1 | 1497231.16 | ||
2020 | 2 | 3735749.74 | ||
2020 | 3 | 3047077.16 | ||
2020 | 4 | 1219314.66 | ||
2020 | 5 | 3141818.05 | ||
2020 | 6 | 2638686.35 | ||
2020 | 7 | 1694440 | ||
2020 | 8 | 3801310.64 | ||
2020 | 9 | 2957324.63 | ||
2020 | 10 | 4371882.85 | ||
2020 | 11 | 6250205.61 | ||
2020 | 12 | 5294252.88 | ||
2021 | 1 | 3279293.13 | 1497231.16 | 1497231.16 |
2021 | 2 | 4819830.84 | 3735749.74 | 3735749.74 |
2021 | 3 | 4197491.7 | 3047077.16 | 3047077.16 |
2021 | 4 | 2317479.91 | 1219314.66 | 1219314.66 |
2021 | 5 | 4184402.55 | 3141818.05 | 3141818.05 |
2021 | 6 | 2959186.54 | 2638686.35 | 2638686.35 |
2021 | 7 | 3475325.2 | 1694440 | 1694440 |
2021 | 8 | 5066696.84 | 3801310.64 | 3801310.64 |
2021 | 9 | 3538197.56 | 2957324.63 | 2957324.63 |
2021 | 10 | 4817855.86 | 4371882.85 | 4371882.85 |
2021 | 11 | 7416168.02 | 6250205.61 | 6250205.61 |
2021 | 12 | 7463875.42 | 5294252.88 | 5294252.88 |
SPLY - Same Period Last Year -
PP- Parallel Period -
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.
Solved! Go to Solution.
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.
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.
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.
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.
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.
@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