Text-based columns (strings) can be sorted differently depending on whether you want digits in the texts to be treated as numbers or to be sorted strictly alphabetically. You might also want to define a custom sort order, if the strings in the column have a hierarchical structure that is not alphabetical.
Note: You can only change the sort order for text-based columns.
To change the default sort order for a column:
On the authoring bar, click
Data in analysis ,
and click on the column of interest.
In the expanded flyout, make sure that Details on selected column is selected.
In the expanded flyout, locate the Sort order section and change the sort order. If you select a Custom sort order you must also define the custom sort order to use.
Comment: Alternatively, you can also Copy
sort order settings from another column in the analysis, by
expanding the section at the bottom of the dialog and choosing a column
to copy the sort order from. See below for examples of sort order
settings.
Response: When you have defined a new sort order for a column, this
is the default sort order that will be used at all places where the
column content is shown.
Example: Standard alphabetical sort order
By default, all text-based columns will be sorted alphabetically. This means that digits and non-alphanumeric characters will be sorted according to their position in the alphabet. The following values will be sorted as seen below:
a#
a1
a20
a3
b1
The number 2 comes before the number 3 in the alphabet, so a20 comes before a3 in the list.
Example: Alphabetical (natural sort of numbers)
If the digits included in the texts should be treated as numbers, you would instead use the alphabetical sorting with natural sort of numbers:
a1
a3
a20
a#
b1
Then, the value a20 will be seen as a higher number than a3, as shown above.
Example: Custom sort order for column with priorities
If your data contains values that you want to display in a certain order, you can define a custom sort order for that column. For example, with a column called 'Priority', containing four different values, the default sort order would give the following result:
If you instead want the bars to be in an order from Low to Critical, you can set up a custom sort order for the Priority column by moving the values up or down in the Sort order dialog using either the Move up/Move down buttons or drag-and-drop:
The resulting order in the visualization will then be as follows:
See also: