Search Results

Changing the default sort order of values in a column

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 may also want to define a custom sort order, if the strings in the column have a hierarchical structure that is not alphabetical.

Prerequisites

You must have some data loaded in the analysis and the Data panel must be shown.

Procedure

  1. In the Data panel, click on the column of interest and click on the Expand data panel for tools and details button, Expand data panel for tools and details..
    In the Data panel, you can also right-click the column of interest and select Sort order from the pop-up menu.
    Note: You can only change the sort order for text-based columns.
  2. In the expanded data panel, locate the Sort order section and change the sort order. If you select a Custom sort order you also need too click on the Settings button, Settings button., and define the custom sort order.
    See below for examples.

Result

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.
Note: You can only change the sort order for text-based columns.

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:

Priority column with default sort order.

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 Custom sort order dialog using either the Move up/Move down buttons or drag-and-drop:

Custom sort order dialog.

The resulting order in the visualization will then be:

Priority column with custom sort order.