Custom dashboards offer data transformation capabilities. You can sort, merge, reorganize, or perform other operations on queried data to facilitate chart visualization. This topic describes how to use the data transformation feature.
tip
You can configure multiple transformation rules. Each rule processes the output of the previous rule.
Add field from calculation
Based on the values of existing fields in the current row, new fields are generated through calculation. This is commonly used for scenarios such as metric derivation, unit conversion, and data normalization.
This data transformation method provides multiple modes, including Binary operation, Unary operation, Reduce row, Row index, Cumulative functions, and Window functions. Select an appropriate mode based on your specific scenario.
tip
The "Replace all fields" toggle is off by default. You can turn it on as needed.
- Off: All fields of the original data are retained, and the newly generated calculation field is appended only to the end of the data. This applies to scenarios where you need to keep both the original and derived metrics for comparison and traceability.
- On: All original business fields are removed. Only essential index fields, such as time and primary keys, and the newly generated calculation field are retained. The original value or dimension fields no longer appear in the result. This applies to scenarios where you focus only on the final calculation result and need to streamline the data source to prevent redundant fields from interfering with chart rendering or table display.
This data transformation method uses functions such as max, min, mean, or last to reduce all rows or data points to a single value. This commonly applies to scenarios such as global total statistics, global extreme value extraction, and single metric summary. This data transformation method supports two modes: Series to rows and Reduce fields. Select an appropriate mode based on your specific scenario.
tip
The "Convert tag to field" toggle is off by default. You can turn it on as needed.
- Off: After reduction, only the series identifier and the aggregated numerical result are output. The dimension labels of the original time series (for example, agent_id, instance, and tool_name) are not split into separate columns. They are embedded in the series name as a concatenated string. This applies to scenarios where you only need to display simple aggregation results and do not need to further filter, sort, or join by dimensions.
- On: After reduction, each dimension label of the original time series is split into a separate column field, and the aggregated value column is retained. The labels change from series metadata into structured table fields. This applies to scenarios where you need to perform subsequent data processing based on dimensions, or where the table needs to explicitly display separate dimension columns.
When multiple query statements are configured, the system defaults to displaying different query configurations as individual tables in the panel. You can toggle between tables using the drop-down list at the bottom of the panel. By configuring data merging, you can merge the results of multiple queries.
tip
To enable data merging, simply click "Add conversion". No further settings are needed. When only one query statement is configured, data merging does not take effect by default.
The merging logic is as follows: If the common fields of two data rows are equal, the rows are merged into a single row. Otherwise, they remain as separate rows. The missing fields will be set to null. Example:
You can use the field sorting capability to define the row order of a table. You can select which column's data to use as the sorting basis and enable descending order.
You can match existing field names by using regular expressions to replace, extract, and rename fields in bulk. This method is suitable for standardizing field names in bulk. This commonly applies to scenarios such as unifying field naming conventions across data sources, trimming redundant prefixes or suffixes, and standardizing fields across multiple instances in bulk. For example, if the match rule is set to ^metrics_(.+) and the replacement template is set to $1, the metrics_ prefix is removed from the field name. For example, if the original field name is metrics_cpu_usage, the field name becomes cpu_usage after this rule is applied.
Filter data by the selected query condition to display only matching results. This is suitable for scenarios such as quickly locating target data or narrowing the scope of results. If no query conditions are selected, all data is displayed by default.
Filter data rows by field values. You can keep or exclude rows that match the specified conditions. This is useful for visualizations focused on a specific data range. Click + Add condition to add a filter rule. The logical relationship between multiple rules is determined by the Condition combination settings.
You can group data by specified dimension fields and then perform aggregate calculations on each group, such as sum, mean, percentile, maximum, and minimum. The output contains one row for each group. This commonly applies to scenarios such as breaking down metrics by multiple dimensions, aggregating by time granularity, and hierarchical statistics.
This transformation uses three specified dimensions to reorganize flat, row-based raw metric data into a two-dimensional matrix pivot table, enabling cross-comparison across two dimensions.
One field is used as the column dimension, one as the row dimension, and one as the display value within the cells. After transformation, the originally row‑expanded data is converted into a table format better suited for horizontal comparison and cross‑analysis. This is suitable for two‑dimensional categorical display scenarios.
tip
Grouping to matrix takes effect when only a single frame exists.
The following example uses "Pod instance" as the row dimension, "Protocol type" as the column dimension, and "Received traffic KB/s" as the cell value. It displays how the original flat data is restructured after the grouping-to-matrix transformation.
Original flat data:
Data after the grouping-to-matrix transformation:
You can rename columns, rearrange column order, and hide columns in a table by using the field reorganization feature. For example, you can hide the Time column, rename "cluster" to "Cluster", and adjust the column order by dragging the target columns.
tip
The field reorganization feature only takes effect on a single data frame. Consider performing a data merge first if needed.
This data transformation method merges multiple series into a single series and appends a column of metric names to each value. This commonly applies to scenarios such as unified visualization of multiple metrics, standardizing multi-series data formats, and normalizing multi-dimensional time series data.
warning
Series to rows does not take effect when only a single frame exists.
Limit the number of rows
Limit the number of data rows displayed. This is suitable for previewing data, querying data in a paginated form, or reducing the amount of data loaded at a time. When a limit is configured, the system returns results according to the specified row count. When no row limit is set, 10 rows of data are displayed by default.