Currently, when sorting the column that has text (or string) data type, the order will be sorted alphabetically.
For example, you have the column with 3 distinct values: high, medium, low. If your sort descending, the order will be like below which is unexpected
priority (desc)
medium
low
high
The correct order should be:
priority (desc)
high
medium
low
Since the sort is not customizable, you could utilize our business calculation to transform your value into 1-low, 2-medium, 3-high and apply the sort afterward
priority (desc)
3-high
2-medium
1-low
The sample syntax for transforming the column using business calculation could be
This is a good tip, and we actually build the dimensions in the models to do this. But, what would be preferable would be being able to have a distinct sort order field.
Even better perhaps, having a sort key defined within the dimension definition, so it always orders correctly rather than users needing to know to use a separate sort field - a bit like what we already do in that case statement, but where the output is stored as a separate key pair.
I would also vote for this type of idea. We have a string field with > 10 unique values. Using the above “workaround” does not work as the ordering is:
1 - val1
10 - val10
11 - val11
Which is obviously incorrect also.
Many other BI tools (Data Studio, PowerBI) already allow you to do this and I think it is a key feature that is required.
Hi, I appreciate this thread is from a while ago but custom sort is something we’ve been discussing in our team, is there anything on the roadmap for bringing in custom sorting?