Data explorer - want numerical sort

I am creating a table that is displaying data which is split by one of the dimensions whose values range from 0-19. When I add a sort, it’s sorting the values alphabetically, so I get 0, 1, 10, 11, … instead of 0, 1, 2, …   How can I make my sort numeric instead of alphabetic?

you got this option to sort

Sort by

By default, results are sorted in descending order based on the aggregation chosen.

To set the sort order

  1. If Sort by is not already displayed in the query editor, select  and then select Sort by from the list.
  2. Set Sort by to the dimension by which you want to sort.
  3. Select the sort order: ASC (ascending) or DESC (descending).

Documentation page

I’ve got a sort added, but it’s not working as I’d like. It’s doing an alphabetic sort - I need numerical.

Hello,

Can you send a screenshot of your configurations?

Thanks,

Islam

If it’s a dimension, you cannot sort it numerically. Dimension is a string, not a number and is sorted lexicographically as stated here. The only way I can think of is to replace the data at the source and pad it with zeroes( 0 → 00, 1 → 01, 2 → 02).

Unfortunate. It would be nice to be able to do a transformation on data before it gets sent to the chart.

yes, unfortunate. This probably won’t happen with the classic data explorer and will be possible only with Grail.