Sorting data¶
When you configure a widget, in its Data settings, you can choose the sort dimensions/metrics.
Use the green chevron on the right of each sort value to switch between ascending and descending order.
If multiple values are selected, the engine will first sort rows by the first one, then by the second one and so on.
Allow viewer to sort tables' data¶
If the widget is a table, in the "order by" settings, you can enable the option named 'Allow viewers to sort rows'.
When this option is activated, the viewer will be able to choose how to sort the table's rows using the icon below:
Sort and computed measure and computed formulas
The sort icon is not available for 'computed measures'. The reason is that these computed measures are generated just before a table is displayed, in your browser. Because the sort option is actually executed by our data engine working on datasources, it does not apply to these measures.
If you need to enable sort on a computed measure. You need to first convert it into a formula in the datasource and then insert this formula as a new column of your datasource.
For the same reason, the sort is applied before any computed or rendering formula is applied. This does
not matter in most cases. But if your computed formula modifies the order, the output rows order will
be wrong. For example, if your computed formula is value * -1
, the rows order will be inverted.