Four pump-speed records can describe an hour spent mostly at low speed even when three rows show high speed. A historian that stores changes creates more rows when machinery moves through its operating range. For a shift or hourly average, give each value the time it represents. State what the equipment did between observations and how the report treats a communication gap.
Reconstruct one pump-hour
Suppose a water utility records commanded pump frequency on change. The four records for one hour are 20 Hz at 09:00, 40 Hz at 09:50, 60 Hz at 09:55 and 60 Hz at the 10:00 report boundary. The first command remains in force for 50 minutes, the next for five minutes and the last for another five. A simple mean of the four recorded values is 45 Hz. Duplicating the same final record would change that mean again, despite having added no running time.
To calculate the command average, multiply each value by its duration, add the results, then divide by the 60-minute reporting window. The area is 20 × 50 + 40 × 5 + 60 × 5 = 1,500 Hz·min. The average command is 25 Hz. The 10:00 observation closes the window. It contributes no additional minutes to the preceding hour. It may supply the starting value for the next one.

A changing measurement needs a different model
The same timestamps might come from sparse measurements of speed during a controlled ramp. If you assume straight lines between readings, the first interval contributes (20 + 40) ÷ 2 × 50 = 1,500 Hz·min, the second contributes 250 and the third 300. The resulting time-weighted average is 34.17 Hz. The difference from 25 Hz measures what the interpolation assumption did to this dataset.
In a pumping station, a drive’s requested setpoint can stay fixed between recorded changes while measured shaft speed ramps up. Give those two tags different names in the reporting model. A technician can then compare like with like across sites. Neither frequency average by itself establishes the volume pumped. That would require an appropriate flow signal or a validated model of the operating conditions.
Close both edges of the period
A dashboard query for records between midnight and midnight can easily miss the state already active at the opening boundary. Retrieve the last trustworthy state at or before the start, then clip the first and last intervals to the reporting window. Use elapsed timestamps for the arithmetic. Keep the Australian site’s local time zone for the labelled shift boundaries so a clock change does not silently create a fictitious hour.
Check the quality flag with the timestamp. If the gateway was offline from 09:10 to 09:45 and the local controller could still change the setpoint, the last value received cannot establish the state for those 35 minutes. Report the verified duration alongside the average or recover the local event history. If all that is known is the communications status, say so. Two averages with different coverage cannot support the same performance comparison without further evidence.
Test the report before using it for decisions
Replay this four-row trace, then insert a repeated 20 Hz observation halfway through the first interval. The stepped result should still be 25 Hz. Change the last point to the next reporting day in a separate test and check how the reporting boundary is handled. Document which tag uses step interpolation, the maximum gap accepted and how a reader sees the coverage percentage.
OPC UA Part 13 defines the TimeAverage aggregate. Tiger Data explains last-observation and linear time weighting. Download the timestamp trace and interval contributions.
Diagrams and worked figures by Industry Applied. The illustrated readings are examples.
