User Tools

Site Tools


wiki:max

MAX() Function

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.

Generic Variables (per device type)

MAX('INC1_AE'), 5

Get the maximum value for the selected period

Device - Specific Variables

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.

Option Parameters

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.

Example

Get the Maximum value of a variable for a day:

MAX('delta0_kwh',1)

wiki/max.txt · Last modified: 2019/09/30 04:52 by admin