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

Join us for an expert-led overview of the tools and concepts you'll need to become a Certified Power BI Data Analyst and pass exam PL-300. Register now.

Reply
Anonymous
Not applicable

how to reorder dates on X-axis of the charts

Hi everyone,

I created a few charts in power bi (line chart, 100% stacked column chart, stacked column chart). The X-axis shows the date of each week (my week runs from every Thursday to Wednesday). 

 

Below is a screenshot of one of the X-axis. I see that 6/15 is before 6/8 and I tried to sort axis asceding by 'start of week' but it didn't work. Can someone let me know how to make them in the correct order please? I have a calendar table and one column being 'start of week'.

 

Annotation 2023-06-19 095552.png

This is how the order of the date in my calendar table looks like:

Annotation 2023-06-19 102454.png

 

Thank you!

2 ACCEPTED SOLUTIONS
vicky_
Super User
Super User

You need to change the type of your dates. Right now, they are being sorted as if they were strings. 
Power Query can do that for you - guide here

View solution in original post

PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Are you actually plotting the date on the x axis?  Looks like you are not, if you are using a text field like the 'Start of Week' you created, you'll get this issue because the values on your x axis are actually text, not dates.

 

Try just using the date on the x-axis.

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


View solution in original post

4 REPLIES 4
PhilipTreacy
Super User
Super User

Hi @Anonymous 

 

Are you actually plotting the date on the x axis?  Looks like you are not, if you are using a text field like the 'Start of Week' you created, you'll get this issue because the values on your x axis are actually text, not dates.

 

Try just using the date on the x-axis.

 

Regards

 

Phil

 



Did I answer your question? Then please mark my post as the solution.
If I helped you, click on the Thumbs Up to give Kudos.


Blog :: YouTube Channel :: Connect on Linkedin


Proud to be a Super User!


Anonymous
Not applicable

Thank you Philip! I think I figured it out. Yes, you are right. My dates are in text format not dates so I transformed them into dates. Then I used format visual->x-axis->type, and changed type from 'continuous' to 'categorical' and the x-axis are now showing start of week dates. 

vicky_
Super User
Super User

You need to change the type of your dates. Right now, they are being sorted as if they were strings. 
Power Query can do that for you - guide here

Anonymous
Not applicable

Thank you Vicky for your help!!

Helpful resources

Announcements
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.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

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

June 2025 community update carousel

Fabric Community Update - June 2025

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