This article describes how to sort charts and tables in dashboards and presentations as well as what sorting options are available in the platform. You'll learn the following topics:
Sorting charts and tables
To sort a chart or a table, edit it, open Appearance tab, and click Sort Options button.
In the dialog that opens, there are several settings:
Select discriminator - the group within which elements will be sorted. This setting is relevant when you have several groups of elements. For example, you may have a selection of 10 countries over a period of two years. In a chart, countries will be grouped by year, and if you want to sort them, you need to choose which year to use as a basis for sorting: this is exactly what discriminator means.
Note: a discriminator can be a dimension that is set as Points (P) while elements which are sorted should be in a dimension set as Series (S).
Choose order - there are two possible order options: Desc, standing for descending order, and Asc, standing for ascending order.
Top - allows to restrict the number of elements displayed on a chart to some number, including a custom number.
Add others - when you choose to show only a restricted number of sorted elements (e.g. top 10 elements), you may put all the other elements into "Others" category by checking "Add others".
Percentage total - this setting allows to display values on a chart in % of total. There are 6 possible options:
- % of table total (all members)
- % of row total (all members)
- % of column total (all members)
- % of table total (selected members)
- % of row total (selected members)
- % of column total (selected members)
The calculation of shares in accordance with these options is illustrated in the example below.
"All members" and "Selected members" options differ in a sense that they have different basis for calculating percentages. When "All members" is selected, percentages are calculated with respect to totals of the entire dataset while in the case of "Selected members", totals are calculated with respect to only selected elements.
Sorting pie and donut charts
Pie and donut charts are different from all other charts because they have different layout. If for ordinary charts "Series" represent elements of legend and "Points" represent axis categories, then for pie and donut charts it is vice versa. So, when you want to apply sorting to a pie chart, you'll see wrong discriminators by default.
For example, if you have a pie chart showing population of 10 countries in 2021 and 2022 and you want to sort this pie chart so that most populated countries in 2022 go first, you would want to choose the year 2022 as a discriminator. However, if you go to "Sort Options", you will see that country names appear in the discriminator list.
To fix this problem, do the following steps:
- Go to the "Dimension Filter" tab and click a cogwheel icon .
- Put Country to Series (P) and Time to Points (P).
- Go to the "Appearance" tab and click "Swap axes" button in the left panel.
- Go to sort options and choose a proper discriminator.
Sorting rankings
Ranking is a visualization type that is sorted by default. That is why you do not need to make additional actions to sort them. However, there are several sorting options available.
Choose order - allows to switch between ascending and descending order.
Top - allows to restrict the number of elements shown, e.g. top 10 or top 100. This is especially helpful when you have thousands of elements to rank but do not want to show them all at once in order not to overload the dashboard.
Base member - allows to select an element that will always be shown at the top of the list irrespective of its actual position. Also, in the tooltip (a box popping up when you hover a mouse over ranking elements) you will see a ratio with respect to base member.
Sorting grid tables
Grid table is a special visualization that is available for flat datasets only. It shows row data in a table form as it is.
To sort a grid table by a column, simply click this column's name. Click again to change the sort order from ascendong to descending. Sorting will be saved once you save the table in a dashboard or a presentation.