AVERAGE
- Last UpdatedMar 20, 2025
- 1 minute read
The AVERAGE() function calculates the time-weighted average value of a stream or array of streams.
When using AVERAGE() in a query, if no resolution is specified, then the behavior is the same as average retrieval mode with no resolution specified; the duration between the start and end times is divided into 100 equal cycles, and the average value is calculated for each cycle.
Syntax
|
Format |
Stream = AVERAGE(Stream or ArrayOfStreams) |
|
Arguments |
Stream - A time-ordered vector of values. ArrayOfStreams - An array of streams. See Selecting an array of streams. |
|
Description |
Returns the time-weighted average value of a stream or array of streams. |
|
Format |
Stream = AVERAGE(Stream or ArrayOfStreams, TimeInterval) |
|
Arguments |
Stream - A time-ordered vector of values. ArrayOfStreams - An array of streams. See Selecting an array of streams. TimeInterval - The time interval over which average values are calculated. |
|
Description |
Returns the time-weighted average of a stream or array of streams over the specified time interval, based on local time. The start and end times are rounded to the start and end times of the interval. For example, if the interval is hourly, the time stamps of all values end with "00:00.000". |