Forum Discussion
Problem with months not in order on line chart
- 6 years ago
Ok. without something to work with it is difficult to assist. But let me try one more thing.
Download this PBIX file. It has some random data I put together for 2020. Notice how the chart is not sorted by month properly. I'm not sure how it is sorted. It isn't alphapbetical or by date. Do the following:
- Click on the Month Name field in the Date table.
- Click on the Column Tools menu (this is the new ribbon)
- Click Sort By Column
- Pick "Month" which is an integer from 1-12 that perfectly corresponds to Jan-Dec.
- In your chart, click the elipses and ensure it is being sorted by Month Name, not Sales.
Ensuring the chart is sorting correctly.
It should now be sorted by the Month Name, which in turn is sorted by the numerical month number.
See if walking through that process helps. I don't know what else to do if I cannot have access to your PBIX file to more closely examine the issue.
edhans, thanks for that. I was able to test your file and was able to play around with it. I don't have a date table which might be onbe of the reasons why I cannot sort my data. I was trying to sort the data based on the date column on the same table. I will try out creating a date table and mapping it to my data table to see if I can make that work. Thanks
Great. You do not have to have a date table, but it makes your life easier if you do, in many ways, and without one, Time Intelligence functions simply do not work.
That M code in my file is my standard Date table that I copy and paste in to all new files. I actually use this method to make it 100% dynamic so it is always covering all data in my file.