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!
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).
In the example supplied on the sort by column instructions it says "the data source table for Stage Label (in an Excel worksheet) has another column".
Does that mean I have to add another column to my data source in order to sort by the order I want, or can I create a look up table? I tried the latter but when I click on the column in data view and select sort on column, I am only presented with columns from that table. This is not helpful as I would prefer not to have to add extra processing to the source file before the report can be run.