Dynamic Cell Attributes - Sorting
Overview
This article explains the sorting capability of template cells and how to configure it. A practical example is used to demonstrate how to apply it effectively.
The example dataset used in this tutorial is: Financial Summary.xlsx
Use Case
When data needs to be displayed in ascending or descending order, use the sorting capability, that is, the cell S attribute (Sort).
It is recommended to complete sorting during the data preparation stage of Chinese-style Reporting Pro. See Data Preparation
Feature Overview
Sorting controls the display order of data columns and supports ascending (S=Asc), descending (S=Desc), and no sorting (S=None). The default is no sorting.
Priority note: sorting configured through dynamic attributes takes precedence over sorting configured during data preparation. If both are configured, the dynamic attribute sorting takes effect and the data preparation sorting is ignored. To keep the data preparation sorting, set the dynamic attribute sorting to no sorting.
Example Result
In the financial summary example, the headers Primary Account and Secondary Account are arranged vertically in a custom order, while Quarter and Month are arranged horizontally in ascending order.

Implementation Idea
- Date fields: Quarter and Month are date-type fields in the View, so it is generally recommended to configure their sorting in the template.
- Text fields: text fields, especially Chinese text fields, often rely on custom sorting. Since the
Sattribute does not support custom sorting, it is recommended to sort these fields in the View in advance.
Steps
- Sort text dimension fields in the View:
-
Create a Chinese-style Report. On the Data Preparation page, drag fields from the View into the sorting area.
-
Click the field to be sorted, select Custom Sorting in the drop-down list, and drag items in the dialog box to define the order.

-
Repeat the previous sub-step to define the custom sort order for Secondary Account.
-
- Configure sorting for date fields in the template.
- Drag the required fields into cells and set Quarter and Month to Ascending in the Dynamic Attributes dialog.
- After configuration is complete, click Preview in the upper-right corner to review the result.
Notes
- Sorting currently supports only dimension fields. Template cells beginning with
=(that is, dragged metric fields) already contain aggregation logic and do not support sorting directly. They can only follow the sorting order of the parent cell. - For metric fields, it is recommended to sort the aggregated results in the View during the data preparation stage.