Forum Discussion
Natural sort order for text
Is there a simple way to sort data in a natural order in PowerBI?
i.e. being able to sort a text column to be ordered as:
A1, A2, A10, A11, A12, A20, A21
instead of:
A1, A10, A11, A12, A2, A20, A21
Thanks.
6 Replies
- MarcelBeugCommunity Champion
It depends on the definition of "Natural"...
My suggestion would be to add a column with the numeric part, sort on that column and then remove that column, as illustrated in this 30 sec video.
- SeanCommunity Champion
Unfortunately though this is not a substitute for Sort By Column in the Data View (you'll still have to do Sort By Column!)
And then don't forget about this sort order column when you are using the ALL function!
- MarcelBeugCommunity Champion
Sean so apparently, one can't specialize in Power Query without sufficient DAX knowledge... :smileyembarrassed:
If I understand corrrectly, the number column I created in my solution should be kept, so it can be used as sort column in the Data View?