You can configure how your query will be sorted. In the Multi-level Sorting menu you can set one or multiple levels of sorting. Following the steps from How to Create a Query. Here are the steps to configure sort in a query.
-
Go to Analytics > Dashboard Manager > Queries.
-
Open an existing query.
-
Click on the Series (
S1) building block.
Series building block -
In the Series settings section:
-
Click Add Section.
-
Select Sort Data.
Defines how rows are ordered at this step of the query.
-
In the Sort Data section:
-
Click Add Level.
-
Select the Column from the drop-down menu.
-
Select the Order type:
-
Ascending
-
Descending
-
-
-
Close the series setting section.
Sort Data settings
-
-
Click Save.
This action will sort your data by a single column. By adding another column you can set a multi-level sorting.
Example
The following example shows table sorted by the following two levels:
-
Population(Descending) -
Life Expectancy(Descending)
Not Sorted Table
Shows an example of the initial, not-sorted dataset.
Multi-level Sorted Table
Shows an example of what the sorted data would look like after applying the steps.
Sort Data is an independent block. The data passed to later blocks is already sorted at that point.