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

Get Fabric Certified for FREE during Fabric Data Days. Don't miss your chance! Learn more

Reply
Anonymous
Not applicable

Order week, month and year in correct order

Hi everyone, 

 

I have a graph with on the x-axis the colum Week and the column Month and year. Due to the fact that some weeks will fall in two months (for example week 48 is the end of November and the start of December). 
As you can see in the image below, I have an issue. I have the option to sort it ascending or descending, but due to the new year, I am not able to get it in the right order. How can I solve this? 

 

Order week right order.png

1 ACCEPTED SOLUTION

@Anonymous , Create a new column

Month Week Year = FORMAT([Date],"mmm-yyyy") & format([Weeknum], "00")
Month Week  Year sort = FORMAT([Date],"yyyymm")*100 + [Weeknum]

 

and Try

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube

View solution in original post

6 REPLIES 6
amitchandak
Super User
Super User

@Anonymous , make sure month year has sort column

 

Month Year = FORMAT([Date],"mmm-yyyy")
Month Year sort = FORMAT([Date],"yyyymm")

 

Sort Month Year.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Hi @amitchandak , 

 

Thanks for your reply 🙂

It is sorted in the right order. When I remove the column week, I get this results. And that is correct. It is just that I can't filter on month and year first, and then filter on week... months in two years.png

@Anonymous , Not sure what format you need.

But add month year and week on axis.

Concatenate label - off

sort on month year and week (sometime, it shows the Concatenate label = off, even when it is on, then repeat step)

 

You should get something like this in screenshot

Concat 1.pngConcat Label Off.pngConcat2.png

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

reorder.png

@amitchandak thank you. Unfortunately, that is not what I mean. I want it shown per week, including month and year, but due to the start of this new year, it messes up the order. I have made a screenshot and drawn a line how to logical order should be like. 

@Anonymous , Create a new column

Month Week Year = FORMAT([Date],"mmm-yyyy") & format([Weeknum], "00")
Month Week  Year sort = FORMAT([Date],"yyyymm")*100 + [Weeknum]

 

and Try

 

 

Share with Power BI Enthusiasts: Full Power BI Video (20 Hours) YouTube
Microsoft Fabric Series 60+ Videos YouTube
Microsoft Fabric Hindi End to End YouTube
Anonymous
Not applicable

Thank you very much! The order is restored. The problem was that the date field was using a different methodolgy. So adding  a column with the formula weeknummer and choosing system 1 (https://docs.microsoft.com/nl-nl/dax/weeknum-function-dax) was enough

Helpful resources

Announcements
Fabric Data Days Carousel

Fabric Data Days

Advance your Data & AI career with 50 days of live learning, contests, hands-on challenges, study groups & certifications and more!

October Power BI Update Carousel

Power BI Monthly Update - October 2025

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

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.

Top Solution Authors