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

Get inspired! Check out the entries from the Power BI DataViz World Championships preliminary rounds and give kudos to your favorites. View the vizzies.

Reply
chq
Helper II
Helper II

Year Over Year Percent Change By Week

Hoping someone can point me in the right direction here...I need to take the data that we have and compare it year over year using our definition of a week. Unlike the traditional Week format we only look at 9 weeks, and the dates that these weeks start change year over year so I can not do it using any YTD calculations. A sample of the Dates/Week data can be found attached as an image. The People data has to originate from a sum, as it counts people by day. "SAMEPERIODLASTYEAR" will not work because the dates for the weeks fluctuate year over year.


I need to be able to see the Year Over Year Percent change by week, so my intended output looks something like this...

Year        Week            People       Percent Change
2019        Week 1          900          -10%

2018        Week 1         1000           11%

2017        Week 1          900            100%

2016        Week 1          450           

2019        Week 2          500            29%

2018        Week 2          700           133%

2017        Week 2          300            63%

2016        Week 2          800           

Any suggestions would be great thanks.

Capture.PNG

1 ACCEPTED SOLUTION
Cmcmahan
Resident Rockstar
Resident Rockstar

Well it looks like you're already part way there, since you have the week number.  Instead of using the builtin SAMEPERIODLASTYEAR calculations, you get to make your own!

 

You can take a look at this answer for a starting point of how to get a difference between the current row value and the previous row value: https://community.powerbi.com/t5/Desktop/Power-BI-Running-Totals-Kinda/m-p/719274#M347104

 

Your case should be simpler than that one, but it has the same idea of finding the difference between the number of people in the current year and the number of people in the previous year while still staying within the same group of weeks.

View solution in original post

2 REPLIES 2
Cmcmahan
Resident Rockstar
Resident Rockstar

Well it looks like you're already part way there, since you have the week number.  Instead of using the builtin SAMEPERIODLASTYEAR calculations, you get to make your own!

 

You can take a look at this answer for a starting point of how to get a difference between the current row value and the previous row value: https://community.powerbi.com/t5/Desktop/Power-BI-Running-Totals-Kinda/m-p/719274#M347104

 

Your case should be simpler than that one, but it has the same idea of finding the difference between the number of people in the current year and the number of people in the previous year while still staying within the same group of weeks.

Anonymous
Not applicable

Doing weekly comparisons always adds in a layer of complexity. I'd check out this article from the sqlbi guys:

https://www.sqlbi.com/articles/week-based-time-intelligence-in-dax/

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

FebPBI_Carousel

Power BI Monthly Update - February 2025

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

Feb2025 NL Carousel

Fabric Community Update - February 2025

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

Top Kudoed Authors