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

Enhance your career with this limited time 50% discount on Fabric and Power BI exams. Ends August 31st. Request your voucher.

Reply
RobRayborn
Helper IV
Helper IV

Retrieve Dates from Week Ranges

I recieve Excel Workbooks that produce weekly forecasts.  Each workbook will forecast out 16 weeks, one column per week based on the Date the workbook was created. The problem comes after the 16 weeks the workbook starts grouping weeks together. Instead of W04, W05, W06, it lists W38-42, W43-47.
I eventually want to group all the weeks up into months. My problem is that once the column with the week designators get to the end of the year the week indicators show as W52-3, or the 52nd week of the current year through the 3rd week of the next year. No indication of YEAR is provided in the column headings. The only actual date comes either from the date in the cell of the sheet provided, or one of the dates from the import of the data, (Date Modified, Date Created.....).
How can show provide the crossover from one year to the next?

1 ACCEPTED SOLUTION
dufoq3
Super User
Super User

Hi @RobRayborn, you can use for W52-3 this logic: if number after "-" is less than number before "-" than add 1 year. If you want to help us with a solution - provide sample data in usable format (read note below my post if you don't know how to do that) and don't forget to provide expected result based on sample data.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

View solution in original post

2 REPLIES 2
dufoq3
Super User
Super User

Hi @RobRayborn, you can use for W52-3 this logic: if number after "-" is less than number before "-" than add 1 year. If you want to help us with a solution - provide sample data in usable format (read note below my post if you don't know how to do that) and don't forget to provide expected result based on sample data.


Note: Check this link to learn how to use my query.
Check this link if you don't know how to provide sample data.

Clever, I'll give it a go.  Thanks for getting back so quickly.

Helpful resources

Announcements
July 2025 community update carousel

Fabric Community Update - July 2025

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

July PBI25 Carousel

Power BI Monthly Update - July 2025

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

Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

Top Solution Authors