LAST_MIN

Compute the minimum value for a given property within a time window between now and a date in the past determined by the provided duration.

Usage

LAST_MIN(eventListName, propertyName, duration)

Parameters

eventListName

String

The name of the event list containing the events to use.

propertyName

String

The name of the property to get an average for. It needs to be a number property.

duration

String

A string representing a duration (expressed in the ISO 8601 format) to determine when to stop the average.

Returns

Number

Examples

LAST_MIN(‘MyColl’, ‘Temp’, ‘P7D’)

Minimum of Temp for events in MyColl fired in the past 7 days.

LAST_MIN(‘MyColl’, ‘Temp’, ‘GETDURATIONFROMSEC(60)’)

Minimum of Temp for events in MyColl fired in the past 60 seconds.

LAST_MIN(‘MyColl’, ‘Temp’, ‘PT1H’)

Minimum of Temp for events in MyColl fired in the past hour.

Remarks

If the provided collection name does not exist, or if no events were fired in the provided time window, the function will return 0.