Forum Discussion
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:
When I put is into a line chart, I get the below:
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
- Anonymous1 year ago
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.
9 Replies
- AnonymousNot applicable
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.
- AnonymousNot applicable
Hi, Anonymous
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
- ray_aramburoSuper 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.
- AnonymousNot applicable
I went into the options and changed the sort axis. It is now sorting correctly! Thanks for the help!
- ray_aramburoSuper User
Glad it worked 🙂
- AnonymousNot applicable
What other date?
- ray_aramburoSuper 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.
- AnonymousNot applicable
This is still an issue. When I go to options, select my date and choose descending, I get the above.
This is sorting by the same date, but in ascending.
What I'm looking for is:
20 Oct., 21 Oct., ....., 1 Nov., 3 Nov.
- AnonymousNot applicable
Hi, Anonymous
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:
And put fields in Line chart, convert the hierarchy of dates to display a normal date format
Also check whether the Sort by Column is sorted by the Transaction Date column
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.