Data Sorting
Overview
Use Cases
If you want fields in a chart to be presented in a specific order so that changes in values can be shown more intuitively, you need to sort dimensions or measures.
Feature Overview
Data sorting supports ascending/descending order, custom sorting, field-based sorting, and alphabetical sorting.
You can drag multiple sorting conditions into the sort area at the same time. When multiple rules exist, they take effect from top to bottom. In addition to sorting text, date, and numeric fields, you can also sort by newly created calculated fields, grouped fields, or fields with aggregation methods applied.
When dynamic dimensions exist, sorting rules dynamically take effect based on the field currently displayed in the chart. For example:
- If the chart currently displays field A as the dimension, only the sorting rule for field A takes effect, while rules for B and C are ignored.
- If the chart switches to field B, only the sorting rule for field B takes effect, while rules for A and C are ignored.
Steps
Ascending / Descending
The rules for ascending and descending sorting are as follows:
- For text fields: extracted databases are sorted by ASCII code, while direct-connection databases follow the default sorting syntax of the database itself.
- For date fields: data is sorted chronologically from earlier to later for ascending order, or later to earlier for descending order.
- For numeric fields: data is sorted from smaller to larger for ascending order, or larger to smaller for descending order.
Custom Sorting
When ordinary ascending or descending sorting does not meet your needs and you want a dimension to follow your own custom order, use custom sorting.
The following example shows how to apply custom sorting to Sales.
- In the charting area, drag the fields to be displayed into the dimension and measure areas.
- Drag the field to be sorted,Sales, into the Sort area.
- Click Sales, choose Custom Sort from the drop-down menu, and configure the desired display order in the pop-up dialog. Two methods are supported:
- Drag to reorder manually
- Paste a list of values in batch to define the order
In the example below, customer categories are manually sorted from highest to lowest customer level.


Field Sorting
In some scenarios, dimension values are numerous and their order changes frequently. Custom sorting by manual drag-and-drop becomes cumbersome and hard to maintain. In this case, you can maintain a separate code field and sort the dimension through that field.

Only dimension fields support this configuration.
When the field used for sorting is numeric, only the No Processing aggregation method is supported.
For example, if a company has hundreds of stores and product categories nationwide, and both stores and categories may be added or removed over time, you may want them displayed in a specific order. In this case, you can maintain a code column and use field-based sorting. The following steps demonstrate the process. Sample dataset: Store Product Category Dataset.
- In the charting area, drag the fields to be displayed into the dimension and measure areas.
- Drag the Store field into the Sort area, click Store, choose Field Sort, then choose Store Code as the sorting field and Ascending as the sorting order. After configuration, Store is sorted according to Store Code.
- Repeat the same process to sort Category by Category Code, then view the result.
Sort Alphabetically
For text fields, ordinary ascending and descending sorting is based on ASCII code. If you want to sort by initial letter, enable alphabetical sorting. Once enabled, it applies to all ascending and descending rules in the sort area: ascending sorts from a-z, while descending sorts from z-a.

Alphabetical sorting is supported only for extracted databases. It is not supported for direct-connection databases.
The following example demonstrates alphabetical sorting on Product Category.
- In the charting area, drag the fields to be displayed into the dimension and measure areas.
- Drag the field to be sorted, Product Category, into the Sort area.
- Click the icon next to Sort and select Alphabetical Sorting. Then click Product Category and choose Ascending or Descending from the drop-down menu to view the alphabetical sorting result.