TABLE DES MATIÈRES
Introduction
The Average Day function is used to determine the typical daily profile of a time series collected via a sensor. It calculates the average value for each time interval of a day, for a specific day or for all days, based on historical data.
Prerequisites
This function requires sensors to be configured on a site, and optionally, these sensors may be assigned a label. These sensors must have a time step of at least daily (day, hour, 30 minutes, 10 minutes, etc.).
Usage
To obtain the average per day, configure an indicator by entering the formula AVERAGE_DAY(XXX;day)
. Once entered correctly, the text will turn green, and the frame surrounding the formula will change from red to blue. If this does not occur, there is likely a syntax error (pay attention to capitalization and parentheses).
XXX
can be:
- A sensor (directly referenced via @ Remote Data)
- Another function available through the Sensor by Label algorithm:
SUM_SENSOR_LABELS(label)
,AVERAGE_SENSOR_LABELS(label)
,MIN_SENSOR_LABELS(label)
,MAX_SENSOR_LABELS(label)
The day
parameter is optional and allows you to apply the average only to the selected day(s). Days should be specified in English, in uppercase, separated by commas. If this parameter is not specified, all days are considered.
Examples of Possible Configurations |
AVERAGE_DAY(sensor) |
AVERAGE_DAY(sensor;MONDAY) |
AVERAGE_DAY(capteur;SATURDAY,SUNDAY) |
AVERAGE_DAY(SUM_SENSOR_LABELS(label)) |
AVERAGE_DAY(SUM_SENSOR_LABELS(label);MONDAY,TUESDAY,WEDNESDAY,THURSDAY,FRIDAY) |
This formula returns results only in widgets of the Indicator, Distribution, and Monthly Evolution groups without aggregation or with aggregation by day or hour.
It can be used with the data type setting = All or By Sensor.
The AVERAGE_DAY
function is available on the following pages:
- Summary
- Reports (site-specific and shared)
- Alerts
Calculation Principle
When calling an indicator configured with the formula AVERAGE_DAY(XXX)
, the following steps occur:
Data for
XXX
is retrieved for a rolling year ending on the widget’s display period end date. For example, if you wish to display average days on a graph from 01/09/23 to 07/09/23, the data used is from 07/09/22 to 07/09/23. The average week calculation thus depends on the display period!If specific days are mentioned in the formula, the retrieved data is filtered based on the day of the week to include only those specified. If no day is specified, all data is retained.
The retrieved data is sorted by the interval to which it belongs. The interval duration corresponds to the chosen aggregation:
- If the widget is configured without aggregation: all values with the same hour and minute are sorted. Example: average of all values at 10:30, 10:40, 10:50, etc.
- If the widget is configured with hourly aggregation: all values with the same hour are sorted. Example: average of all values at 10:00, 11:00, 12:00, etc.
- If the widget is configured with daily aggregation: all values are retained.
The average of the values sorted by interval is calculated.
Results are displayed according to the requested aggregation.
If the widget period is more than one day, the same values will be shown identically for each day, with the same pattern visually repeated each day.
Examples:
No day specified and hourly aggregation: All days display the average daily profile established over a year.
Daily consumption profiles: 7 indicators with each having a specified day, no aggregation, displayed for a single day.