Forum Discussion
sort doesn't work well on non-alphabetic text fields
- 10 years agoHi there - we have a feature called 'Sort By' that should be able to help you here, for example making weekdays or month names appear in the right order in visuals. More details on that here: https://powerbi.microsoft.com/en-us/documentation/powerbi-desktop-sort-by-column/ Hope that helps you!
- aront10 years ago
Helper I
Thanks. Worked perfectly and solved my problem. I had already had a numeric index field to use to get it to sort the way I wanted. I was temporarily using that as the axis label. This is so much better! :)
- SNik10 years ago
Helper I
I have the same issue but its age banding and i am using a Slicer,
I have ...
Age AgeBand
1 [1-10]
2 [1-10]
3 [1-10]
.
.
22 [21-30]
23 [21-30]
.
.
and i am only using a Slicer and only displaying the [AgeBand] field , and i have sorted by [Age] and etc... but the [AgeBand] is not sorting correctly in the slicer.
the link doesn't work for slicers, any suggestion?
- greggyb10 years ago
Resident Rockstar
SNik, slicers follow the sort order defined in the data model, including allowing the use of the Sort By feature as described above. The sort-by field must 1:1 or 1:N with the field to be sorted. Your sample data is N:1 for sort-by field:field to be sorted, so you cannot define the sort column in your data model.
You should create a field, AgeBandSort which maps 1:1 with AgeBand, and includes integers in the order you'd like (e.g. 1 for all [1-10], 2 for all [11-20], and so on).