cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Highlighted
afk Helper II
Helper II

Sorting week number from previous year to new year

Is there a way to sort week numbers from the previous year to the new year on a line chart? e.g. Week 52 (2017) to Week 1 (2018)

 

I currently have a column with the function 'WEEKNUM ([date])' to pull the week numbers, but obviously when I sort by week number, Week 1 of 2018 will appear first.

 

Week Number.JPG

 

Thanks

 

1 ACCEPTED SOLUTION

Accepted Solutions
jthomson Solution Sage
Solution Sage

Re: Sorting week number from previous year to new year

You'll want to work around this by making a year-week column, which you then tell your existing column to sort by - there's a few examples of this if you search (year-month columns being the same principle and a more common question), but you basically get it so that Power BI recognises that 201752 is less than 201801

View solution in original post

2 REPLIES 2
jthomson Solution Sage
Solution Sage

Re: Sorting week number from previous year to new year

You'll want to work around this by making a year-week column, which you then tell your existing column to sort by - there's a few examples of this if you search (year-month columns being the same principle and a more common question), but you basically get it so that Power BI recognises that 201752 is less than 201801

View solution in original post

afk Helper II
Helper II

Re: Sorting week number from previous year to new year

Thank you, this worked great!

 

However, it seems to have only worked on a column chart. When applied to a line chart, it's still sorting the numbers from 0-52. 

 

Any idea why this is?

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors