02 Transformations
Transform and process data in Grafana.
Transformations process data after the query but before visualization: aggregate, filter, rename, combine. In this tutorial you will learn the most important transformations and build a summary table like this step by step:

What you will learn
Aggregate data with Reduce (minimum, maximum, mean)
Rename, reorder, and hide fields
Add trend lines with regression analysis
Combine data from multiple queries
Chain transformations
Prerequisites
Completed Part 1 and Part 2 of the tutorials
Basic knowledge of panel creation
The Transform tab
Edit a panel
Click the Transform tab (between Query and Alert)
Click + Add transformation and select a transformation
Transformations are executed from top to bottom. You can reorder them via drag and drop, disable them (eye icon), or delete them (trash icon).
The order affects the result. A filter before Reduce produces different results than after.
Reduce
Converts time series data into aggregated values. Ideal for summary tables.
Add the Reduce transformation
Select the calculations:
Last *
Last non-null value
Min / Max
Minimum / Maximum
Mean
Average
Sum
Sum of all values
Difference percent
Percentage change
All values
Array of all values (for sparklines)

Organize fields by name
Rename, reorder, and hide columns. Essential for clean tables.
Add the Organize fields by name transformation
For each field:
Rename: Enter a new display name
Hide: Click the eye icon to hide
Reorder: Drag and drop to reorder

Rename by regex
Rename multiple fields at once using pattern matching.
Match
Regex pattern to match
Replace
Replacement text ($1, $2 for capture groups)
Examples:
Extruder (.) Durchsatz
Ext $1
Extruder A Durchsatz
Ext A
\(Soll\)
(Target)
Speed (Soll)
Speed (Target)
(.+) - (.+)
$2
Kiefel - Durchsatz
Durchsatz

Common regex patterns
.
Any single character
A, 1, -
.*
Any number of characters
Extruder A Durchsatz
.+
At least one character
like .*, but not empty
(...)
Capture group (use $1, $2 in Replace)
(Extruder .) → $1
\( / \)
Literal parentheses
\(Soll\) matches (Soll)
^ / $
Start / end of string
^Kiefel matches only at the start
[A-C]
Character class
Extruder [A-C]
\d+
One or more digits
Sensor \d+ matches Sensor 42
Filter by name
Show only specific fields in the output.
Add the Filter by name transformation
Select Include (show only selected fields) or Exclude (hide selected fields)
Select fields manually via checkboxes or filter by regex

Regex examples for Filter by name:
Include
Durchsatz|Temperatur
Show only throughput and temperature fields
Exclude
.*\(Soll\)
Hide all setpoint values
Include
Extruder [AB].*
Show only Extruder A and B
With Filter data by values you can also filter rows by conditions, for example only showing data points where the temperature is above 200 °C.
Regression analysis
Add trend lines to identify how data evolves over time.
Add the Regression analysis transformation
Set X field to the time field and Y field to the value field

The regression line shows the overall trend: rising, falling, or stable.

Style the trend line
By default, the regression line has no unit and appears on a separate Y-axis. Add an override:
Match the field by regex:
.*predicted.*Set the Unit to the same unit as the original data
Choose a different color (for example red) and a dashed line style
Combine data
When you want to merge data from multiple queries, two transformations are available:
Merge
Combines all time series into one table. No configuration needed.
Join by field
Joins tables on a shared field (for example a timestamp). Mode: Inner, Left outer, or Right outer.
Example: machine comparison
This example shows how to use a transformation chain to summarize the throughput of two machines in a compact comparison table.
Step 1: Create two queries
Create two separate queries, one for each machine. Name the queries after the machine (for example "Kiefel" and "Macchi") so the data can be distinguished later.

Step 2: Build the transformation chain
Switch to the Transform tab and add the following five transformations one after another:

Rename by regex (x2): Rename the "Durchsatz" field in each query so the machine is identifiable. Match:
Durchsatz, Replace:KiefelorMacchi. Click the filter icon on the transformation and under Apply transformation to select the corresponding query (for example "Query: Kiefel"). This way each rename only applies to its own query.Join by field: Joins the two renamed time series on the timestamp into a single table.
Reduce: Aggregates the time series into one row per machine with the calculations Last *, Min, Max, Mean, All values, and Difference.
Organize fields by name: Renames the columns to be more readable (for example "Field" to "Machine", "Last *" to "Current", "All values" to "Trend") and sorts them into the desired order.
Result
The finished table compares both machines at a glance, including a sparkline trend display:

The column formatting (Bar Gauge for "Current", colored background for "Change", Sparkline for "Trend") is configured via Overrides > Fields with name > Cell options. For details, see the tutorial Tables.
Use the Table view toggle in the panel editor to check intermediate results after each transformation.
Tips
Performance: Transformations run in the browser. Filter at the query level when possible.
Debugging: Add transformations one at a time and use the Table view toggle to check intermediate results.
Common patterns: Time series to summary table: Reduce + Organize fields. Sparklines: Reduce with All values + Override on cell type.
Next steps
Introduction to the ENLYZE API - API-based dashboards for advanced use cases
Last updated