Skip to main content
Skip table of contents

Aggregation

When the resolution of data is different from the resolution of the corresponding time series it becomes necessary to condense or spread the data as needed in order to obtain feasible results.

Examples

  • A time series stores daily consumption records. The data is read out for an entire year as one value.
  • A sensor provides hourly values. The data is stored on a time series with a 15 minute interval.

In the context of HAKOM time series as well as in this documentation, both operations in the above examples are refered to as aggregation.

Aggregation Methods

Different use cases require different methods of aggregation to provide feasible results. The following aggregation methods are currently available:

  • Sum
  • Average
  • Min
  • Max
  • MostFrequently
  • AtTheMoment
  • Last Value 1)
  • AbsMin
  • AbsMax

1) Aggregation method "Last Value" has been introduced with patch version 3.9.2.2

Order of Aggregation Methods

There are multiple ways to apply an aggregation method to a data operation and an inherent order controls which method will be applied in case more than one aggregation method would be applicable. The possible configuration options are listed here in the order they will be overruled (eg. an aggregation method configured in the master data of a time series will overrule the aggregation method specified for the unit assigned to this time series).

Unit

Certain units are preconfigured in the HAKOM database and have an aggregation method assigned to them. These entries can be changed, deleted or extended as needed, more information can be found here: Units and aggregation rules

Time Series

Each time series may have it's own aggregation method configured as part of the time series master data. More information on time series master data can be found here: Define time series

Formula References

For formula time series it's possible to specify the aggregation method that will be used when resolving a time series reference in the formula. More information can be found here: Formulas and time series

Data Request

When reading out data via the WebTSM Services it is possible to specify the desired aggregation method for a singular request. More detailled information can be found at the documentation of relevant endpoints here: Open API Reference

Sum

Values are summed up when condensing multiple values from short intervals over a longer time period and divided proportionally when spreading a value over multiple intervals.

Click here to expand example

Examples

Higher resolution → lower resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 00:151000:00 - 01:00


(10+20+30+40) = 100
00:15 - 00:3020
00:30 - 00:4530
00:45 - 01:0040

Lower resolution → higher resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 01:00

10000:00 - 00:15100/4 = 25
00:15 - 00:30100/4 = 25
00:30 - 00:45100/4 = 25
00:45 - 01:00100/4 = 25

Average

Values are averaged out when condensing multiple values from short intervals over a longer time period and repeated when spreading a value over multiple intervals.

Click here to expand example

Examples

Higher resolution → lower resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 00:151000:00 - 01:00


(10/4+

20/4+

30/4+

40/4) = 100/4 = 25

00:15 - 00:3020
00:30 - 00:4530
00:45 - 01:0040

Lower resolution → higher resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 01:00

10000:00 - 00:15100
00:15 - 00:30100
00:30 - 00:45100
00:45 - 01:00100

Min

Provides the lowest value in the selected time period when condensing multiple values. When spreading a value over multiple intervals "Min" behaves like "Average".

Click here to expand example

Examples

Higher resolution → lower resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 00:151000:00 - 01:00


10

00:15 - 00:3020
00:30 - 00:4530
00:45 - 01:0040

Lower resolution → higher resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 01:00

10000:00 - 00:15100
00:15 - 00:30100
00:30 - 00:45100
00:45 - 01:00100

Max

Provides the highest value in the selected time period when condensing multiple values. When spreading a value over multiple intervals "Max" behaves like "Average".

Click here to expand example

Examples

Higher resolution → lower resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 00:151000:00 - 01:00


40

00:15 - 00:3020
00:30 - 00:4530
00:45 - 01:0040

Lower resolution → higher resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 01:00

10000:00 - 00:15100
00:15 - 00:30100
00:30 - 00:45100
00:45 - 01:00100

Most Frequently

Provides the most frequently used value in the selected time period when condensing multiple values. In case multiple values occur with the same frequency, the chronologically last of these values will be returned. When spreading a value over multiple intervals "Most Frequently" behaves like "Average".

Click here to expand example

Examples

Higher resolution → lower resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 00:151000:00 - 01:00


20

00:15 - 00:3010
00:30 - 00:4520
00:45 - 01:0020

Lower resolution → higher resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 01:00

1000:00 - 00:1510
00:15 - 00:3010
00:30 - 00:4510
00:45 - 01:0010

At The Moment

Provides the first value in the selected time period when condensing multiple values. Values with the flag "Missing" will be ignored by this aggregation method. When spreading a value over multiple intervals "At The Moment" behaves like "Average".

Click here to expand example

Examples

Higher resolution → lower resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 00:152000:00 - 01:00


20

00:15 - 00:3010
00:30 - 00:4530
00:45 - 01:0040

Lower resolution → higher resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 01:00

10000:00 - 00:15100
00:15 - 00:30100
00:30 - 00:45100
00:45 - 01:00100

Last Value

This aggregation method has been added in patch version 3.9.2.2


Provides the last value in the selected time period when condensing multiple values. Values with the flag "Missing" will be ignored by this aggregation method. When spreading a value over multiple intervals "Last Value" behaves like "Average".

Click here to expand example

Examples

Higher resolution → lower resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 00:152000:00 - 01:00


40

00:15 - 00:3010
00:30 - 00:4530
00:45 - 01:0040

Lower resolution → higher resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 01:00

10000:00 - 00:15100
00:15 - 00:30100
00:30 - 00:45100
00:45 - 01:00100

AbsMin

Similar to the aggregation method "Min" this method provides the lowest absolute value in the selected time period when condensing multiple values, ignoring positive/negative signs. When spreading a value over multiple intervals "AbsMin" behaves like "Average".

Click here to expand example

Examples

Higher resolution → lower resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 00:15-2000:00 - 01:00


10

00:15 - 00:3010
00:30 - 00:4530
00:45 - 01:00-40

Lower resolution → higher resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 01:00

10000:00 - 00:15100
00:15 - 00:30100
00:30 - 00:45100
00:45 - 01:00100

AbsMax

Similar to the aggregation method "Max" this method provides the highest absolute value in the selected time period when condensing multiple values, ignoring positive/negative signs. When spreading a value over multiple intervals "AbsMax" behaves like "Average".

Click here to expand example

Examples

Higher resolution → lower resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 00:15-2000:00 - 01:00


40

00:15 - 00:3010
00:30 - 00:4530
00:45 - 01:00-40

Lower resolution → higher resolution

Source IntervalValueTarget IntervalAggregated Value
00:00 - 01:00

10000:00 - 00:15100
00:15 - 00:30100
00:30 - 00:45100
00:45 - 01:00100

Further Information

We recommend the following videos under Video Tutorials:

  • Aggregation
  • Behaviour of Flags During Data Aggregation
JavaScript errors detected

Please note, these errors can depend on your browser setup.

If this problem persists, please contact our support.