Forum Discussion
Month Name not sorting properly in visual.
Hello
I have a column that contain text of month names.
When I put it in the visual and in the "Sort by Column" option I choose by month. I get this visual.
January then October... so Power BI is ranking it like 1, 10, 11, 12, 2, 3, 4, 5, 6, 7, 8, 9.
However, testing with the same dataset on my work computer, power BI sort it just fine like this
What might be the reason and how can I fix it?
4 Replies
- Ahmedx
Super User
your need sort months name by Month Number column
https://www.youtube.com/watch?v=i4LjSdCbGMk&ab_channel=BITechLake
- BenBlackswan
Helper V
I don't have that MonthNumber option in the "Sort by column" drop down list.
And neither does the power bi on my work computer, yet it is sorted properly tho
- Idrissshatila
Super User
Hello BenBlackswan ,
you need to create a month number column then sort the month name column by the number.
check this https://youtu.be/NlX7Cp2P0d4?si=f3nj4lIZrpswxXoO
If I answered your question, please mark my post as solution, Appreciate your Kudos 👍
Follow me on Linkedin
Vote for my Community Mobile App Idea đź’ˇ
- BenBlackswan
Helper V
Okay, I deleted the Date master table from Power Query and re-imported it.
Then manually changed the column to their correct type. And now it is working.
So for some reason, the Power Query or Power BI on my own personal computer is not as smart as the Power BI on my work computer, it is not assigning correct data type after importing from excel.
Still weird because why would the data type on the other columns affect the visual on "Month Name" which has always been Text data type??