IEC 62541 · Access type

Part 13: Aggregate Functions

Document numberOPC 10000-13
IEC designationIEC 62541-13
ColloquiallyPart 13
GroupAccess type

Part 13 defines the server-side aggregate functions - average, time average, minimum, maximum, count, delta, standard deviation, duration and percent good, and the rest - together with the configuration that controls how they treat bad data and interval boundaries. It is what makes a processed history read trustworthy.

What it defines

A catalogue of named aggregate functions, each with a NodeId in the server's AggregateFunctions folder, and precise rules for computing each one over an interval of raw values. A processed HistoryRead names an aggregate and an interval length, and the server does the arithmetic. The same functions are available on a live subscription through an aggregate filter, so a client can subscribe to a one-minute average rather than to every sample.

The functions you will actually use

Interpolative and Average are the naive choices and are usually not what you want. TimeAverage weights each value by how long it held, which is the correct average for a process value sampled irregularly. Minimum, Maximum and Range, with their actual-time variants, give extremes and when they occurred. Count, Delta, Total and NumberOfTransitions cover counters and state changes. DurationGood, DurationBad, PercentGood and PercentBad quantify how much of the interval had usable data, and WorstQuality reduces the interval to its worst status.

Configuration decides the answer

An AggregateConfiguration controls whether uncertain data is treated as bad, what percentage of bad data makes the whole result bad, what percentage of good data makes it good, and whether extrapolation at an interval edge uses a sloped or a stepped assumption. Combined with the Stepped flag on the node's historical configuration, this means two servers holding identical raw data can legitimately return different averages. The configuration is part of the answer, not a detail.

The status code is part of the result

Every aggregate result carries a StatusCode describing the calculation, not just the value: whether the interval was partial, whether too much of it was bad, whether the value is uncertain because it was extrapolated. A client that pulls the value and drops the status ends up plotting an average computed from a tenth of its interval as though it were solid. Read the status, and surface partial intervals rather than smoothing over them.

What it defines

ConceptWhat it is
AggregateFunctions folderWhere a server publishes the aggregates it supports, each as a node with a stable NodeId. Browse it rather than assuming a function exists.
Interpolative and AverageStraight interpolation between an interval's bounding points, and the unweighted mean of the raw values in it. Both are simple and both are biased by however unevenly the source happened to sample.
TimeAverage and TimeAverage2Time-weighted averages, which is the correct choice for an irregularly sampled process value. The two variants differ in how they treat interval boundaries and bad data.
Minimum, Maximum and RangeExtremes over the interval, plus MinimumActualTime and MaximumActualTime giving the timestamps at which they occurred.
Count, Delta and TotalSample counts, the change between the interval's first and last value, and the integral. Delta and its bounded variants are how a production counter becomes a per-interval quantity.
DurationGood and PercentGoodHow much of the interval carried usable data, as a duration or a proportion. The honest denominator for any availability calculation.
WorstQualityReduces the interval to the worst StatusCode it contained. Useful as a companion series alongside an average, to show where the average should be distrusted.
Standard deviation and varianceSample and population variants of both. Present in the catalogue and frequently unimplemented by servers, so check before designing around them.
AggregateConfigurationTreatUncertainAsBad, PercentDataBad, PercentDataGood and the sloped-extrapolation switch. These four settings change the numbers a server returns.
Aggregate filter on a subscriptionApplies an aggregate to a live MonitoredItem so the client receives computed values on a cycle. A separate capability from processed history.

Do you need to read it?

Anyone computing OEE, energy or throughput from OPC UA history, and anyone building trend displays over long ranges. Pushing aggregation into the server saves an enormous amount of bandwidth and is the only sensible approach over a constrained link - provided you know how the server was configured to compute it.

Traps that trace back to this part

  • The numbered variants are different functions, not versions. TimeAverage and TimeAverage2, Total and Total2, WorstQuality and WorstQuality2 differ in their treatment of interval bounds and non-good data. Mixing them across servers, or letting a client library pick one, means the same raw data yields different reported numbers.
  • The result's StatusCode carries the quality of the calculation. An average over an interval that was ninety percent bad still returns a number, marked uncertain or bad, and dropping the status turns a data gap into a confident wrong value on a report someone acts on.
  • Aggregates depend on the node's Stepped flag and on AggregateConfiguration, so two servers over identical raw history can both be right and disagree. If a figure has to reconcile with another system, pin the aggregate, the interval, the configuration and the stepped setting, and record them alongside the result.
  • Support is patchy and advertised in two places: whether a server implements processed history reads at all, and separately whether it supports aggregate filters on subscriptions. Browse the AggregateFunctions folder and check the historical aggregate facet rather than assuming the catalogue is available.

Last verified 7 September 2026 against OPC UA 1.05.07. The specification parts themselves are published by the OPC Foundation. OPC UA Connect is an educational resource and is not affiliated with the OPC Foundation.

Free download
OPC UA Server Acceptance Test Pack
A 40-check acceptance test you run against a vendor's server before commissioning sign-off. Weighted scoring, three hard gates, and a one-page verdict for the supplier meeting.
Get the free test pack →
Free, no course, no login