The MAX() function can be used in a variety of ways to get the maximum value of a variable.
Usage:
MAX(variable, options, [days])
- see below for description.
MAX('INC1_AE'), 5
Get the maximum value for the selected period
For device specific variables use a . to separate the device name:
MAX('My Device.My Value',1)
Get the maximum value of the variable for the current day.
The second parameter, [options] is a number and can be any of the following
0 | latest value (Default) |
1 | DAY - Maximum value for current day |
2 | WEEK - Maximum value for current week |
3 | MONTH - Maximum value for current month |
4 | YEAR - Maximum value for current year |
5 | PERIOD - Maximum value for the selected range |
6 | SLICE - Maximum value for the slice in the range (i.e. in a graph segment) |
The third optional parameter lets you shift the range by a specific amount of days - i.e. a value of 7 will calculate the maximum value for the selected period 1 week ago.
Get the Maximum value of a variable for a day:
MAX('delta0_kwh',1)