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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
Eddie_Price
Regular Visitor

Sorting by Day and Month for a Line Chart

I have a table that I'm refreshing on a daily basis that has a date field in it and it looks like this:

Eddie_Price_0-1730728814441.png

 

When I put is into a line chart, I get the below:

 

Eddie_Price_1-1730728878317.png

I have the data sorted by the Transaction Date, but as you can see, the X-Axis is not displaying in ascending order.  I have watched some videos on this, but it is all based on a Date Calendar.

 

Is there any other way to sort the X-Axis

1 ACCEPTED SOLUTION
Eddie_Price
Regular Visitor

I finally got it working this morning.  Part of the problem, I was trying to use the Hierarchy date of the Transaction Date.  By just sorting on the Transacation date, I was able to have it display correctly.

View solution in original post

9 REPLIES 9
Eddie_Price
Regular Visitor

I finally got it working this morning.  Part of the problem, I was trying to use the Hierarchy date of the Transaction Date.  By just sorting on the Transacation date, I was able to have it display correctly.

Hi, @Eddie_Price 

Glad to hear you solved the problem yourself!  
If you can, please share your solution, which will be beneficial for future users to read this post. 

 

Best Regards

Yongkang Hua

Eddie_Price
Regular Visitor

Eddie_Price_1-1730745219157.png

 

This is still an issue.  When I go to options, select my date and choose descending, I get the above.

 

Eddie_Price_2-1730745318147.png

This is sorting by the same date, but in ascending.

 

What I'm looking for is:

 

20 Oct., 21 Oct., ....., 1 Nov., 3 Nov.

 

Hi, @Eddie_Price 

Make sure that the Transaction Date column is formatted as a date in the data source.  Dates may be stored as text, which can cause sorting issues. I also create a sample table:

vyohuamsft_1-1730774497686.png

And put fields in Line chart, convert the hierarchy of dates to display a normal date format

vyohuamsft_2-1730774679558.png

vyohuamsft_3-1730774703426.png

Also check whether the Sort by Column is sorted by the Transaction Date column

vyohuamsft_4-1730774749401.png

 

If it does not help, please provide more details with your desired output and pbix file without privacy information (or some sample data)

 

How to Get Your Question Answered Quickly

Best Regards

Yongkang Hua

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

ray_aramburo
Super User
Super User

I thought you had 2 different dates, one from a Calendar table and that Transaction Date. In any case, go to the visual options ( . . . ) and share a picture of how it is currently sorted.





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





ray_aramburo
Super User
Super User

Drag your other date to the tooltips of that visual, after that, you'll notice that you can now use that field to sort the visual in its options. 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





I went into the options and changed the sort axis.  It is now sorting correctly!  Thanks for the help!

Glad it worked 🙂 





Did I answer your question? Give your kudos and mark my post as a solution!

Proud to be a Super User!





What other date?

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.