TH NextGen - Tag Builder: Aggregation

Aggregation tags allow you to create moving window functions over individual tags based on certain operators. Using aggregation tags you can get the minimum or maximum value for a tag in the specified time window or average out the signal over a time window to smooth out noisy data.

The aggregation tags can be found in the tag builder menu.

Aggregation tag submenu

To create an aggregation-tag you need to select Tag Builder in the TrendHub menu, then click on the aggregation option. Fill out the following four parameters:


  • Tag to aggregate: Select the tag/attribute you wish to aggregate. This tag will be used as the source for your aggregated tag. This can be any tag existing in TrendMiner, if they do not conflict with the restrictions highlighted at the bottom of this page.
  • Operator: The function you wish to use to aggregate your data. All available operators are listed below.
  • Direction: This option determines if the chosen time window will aggregate datapoints of the past (backwards), current time (central) or future (forward). See the How do aggregations work? section below.
  • Aggregate per: This is where you define the length of your window. The length is expressed in duration and needs to be at minimum your index resolution and at maximum a duration of 24h.

Overview Operators

Available operators include:

  • Average: Returns the average value over the defined time window.
  • Minimum: Returns the minimum value over the defined time window.
  • Maximum: Returns the maximum value over the defined time window.
  • Range: Returns the range between the minimum and maximum over the defined time window.
  • Delta: Returns the difference between the start and ending value over the defined time window. This option can be used as an approximation for a derivative tag.
  • Integral: Returns the area under the curve over the defined time window. You will also need to specify the time dimensions of your measurement to return the correct calculation.


How do aggregations work?

Aggregations are created on a specific time window. This time window can have different lengths, but also a certain direction where datapoints need to be included for the calculation. Here is where the direction of the aggregation plays a role:

  • A backwards direction: aggregates datapoints from the past;
  • A central direction: aggregates datapoints from both the past and future;
  • A forward direction: aggregates datapoints from the future.

The example below shows how the direction affects an aggregation with a maximum operator. The calculation is shown for the point at timestamp 3. The values which are taken into account are indicated in orange on the second row.


The aggregation functionality performs the calculation for each timestamp (or in other words a rolling window) and plots the output as a new tag. An example of how such a new output tag is created shown below, using a forward direction and maximum operator:



The general restrictions can be found in the Tag Builder overview document and are applicable to aggregations.

Time window lengths

The time window needs to be at least the same as the index-resolution and can maximum be 24h.

Enjoying TrendMiner? Share your experience to help the community and receive $25.
Rate TrendMiner