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

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
PetrK
Helper II
Helper II

Wrong order of week at the turn of the year

Hello, I'm faceing this issue.
In "Line and stacked columns chart" in x-axis I have year, month and week. Week is calculated according iso standard by formula week= WEEKNUM([Date], 21). And if happen that week 1 contains some days from previous year it display this part of week at the begining of the december. More clear it is visible on the picture. There are highlighted days 30. and 31. December 2024 which are in the week 1 of the year 2025 by the calculation of iso standard. And chart display these two days  of week1 on first place in december. 
Do you know how to display this part of week 1 at the end of december. So order of week will be 48, 49 , 51 , 52, 1, 1.

 

Thank you   

PetrK_1-1709629401712.pngPetrK_2-1709629569177.png

 

 

     

 
 

 

 

1 ACCEPTED SOLUTION

Thank you for you idea. Unfortunately it doesn't work. It display this message 

PetrK_0-1709638432158.png

But it change my mind and finally I a bit modified my formula for week calculation and from first days of week 1 which are still in the old year I create week 54. It is not great solution but much better than original one.

PetrK_1-1709638790659.png

 

View solution in original post

2 REPLIES 2
PijushRoy
Super User
Super User

Hi @PetrK 

Create another column for YearWeekNo
YearWeekNo = Year(Table[Date])&WEEKNUM([Date], 21)

Now change the exisitng WEEKNUM column Sort By of the new column YearWeekNo
Here is the option

PijushRoy_0-1709630726599.png

 


Let me know if that works for you


If your requirement is solved, please mark THIS ANSWER as SOLUTION ✔️ and help other users find the solution quickly. Please hit the Thumbs Up 👍 button if this comment helps you.

Thanks
Pijush
Linkedin

Thank you for you idea. Unfortunately it doesn't work. It display this message 

PetrK_0-1709638432158.png

But it change my mind and finally I a bit modified my formula for week calculation and from first days of week 1 which are still in the old year I create week 54. It is not great solution but much better than original one.

PetrK_1-1709638790659.png

 

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

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

April Fabric Community Update

Fabric Community Update - April 2024

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