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

July 7 - July 17 | Round 2 of the Power BI Dataviz World Championships. Don't miss your chance! Learn more

Reply
margheritaiacob
Frequent Visitor

Order problem

Immagine 2022-08-16 114015.jpg

Hi, 

pls I have problem with X-axis order even if I used "Sort axis > week of year > sort ascending", it didn't solve my problem. How could I resolve it? Help me pls

1 ACCEPTED SOLUTION
NickolajJessen
Solution Sage
Solution Sage

If you're not using a calendar table. You should do that.

Next you go and create a integer version of the yearweek and use Power bi Sort by function.

here is an example but with months in stead. I hope you get the general idea.

NickolajJessen_0-1660643681677.png

 

 

View solution in original post

3 REPLIES 3
Vitali_L_B
Frequent Visitor

Hi, they are sorted alphabetically - you can try formatting your weeknumber as "0#" so that when you have week 6, you get 06, instead of 6 - this would translate to 2022-06 and it will be sorted properly. That's the easiest thing you can do, having a calendar table is always a good approach, as already suggested above.

NickolajJessen
Solution Sage
Solution Sage

If you're not using a calendar table. You should do that.

Next you go and create a integer version of the yearweek and use Power bi Sort by function.

here is an example but with months in stead. I hope you get the general idea.

NickolajJessen_0-1660643681677.png

 

 

Jihwan_Kim
Super User
Super User

Hi,

I am not sure without seeing your dataset, but I assume you can try to sort week of year column by weekenddate column in the same table.

If you do not have a weekenddate column in the same table, try to create this in Power Query Editor or by DAX formula (Calculated Column), and then sort week of year column by weekenddate column.

Thank you.


If this post helps, then please consider accepting it as the solution to help other members find it faster, and give a big thumbs up.


Click here to visit my LinkedIn page

Helpful resources

Announcements
FabCon and SQLCon Barcelona 2026

FabCon & SQLCon – Barcelona 2026

Join us in Barcelona for FabCon and SQLCon, the Fabric, Power BI, SQL, and AI community event. Save €200 with code FABCMTY200.

60 days of Data Days Carousel

Data Days 2026

Join Fabric Data Days 2026: 60 days of free live/on-demand sessions, challenges, study groups, and certification opportunities.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.