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.
You do not have to sort by a date column, but you do have to provide a sortable column in your data set so Power BI knows how to sort. A date table is far and away the best practice here, but you can use any column to sort. See this article.
If you cannot get it to work, can you share your PBIX file via OneDrive or other method so someone can take a look at it? There is no workaround here. Sort By Columns is the thing. Period.