ON THIS PAGE:
Format
ContinuousMax_Sampled(Expr ,StartTime [,EndTime])
Returns
Returns the maximum value at which an expression is held over a range of time.
Inputs
Expr: The expression whose values should be processed to find the maximum.
Behaviour: Required
Dimension: Collection
Valid data types: Boolean, DateTime, Decimal, Integer, String, Duration
StartTime: The start time over which to produce the maximum.
Behaviour: Required
Dimension: Collection, SingleValue
Valid data types: DateTime, Decimal, Integer, String
EndTime: The end time over which to produce the maximum. If not specified, it assumes the current time.
Behaviour: Optional
Dimension: Collection, SingleValue
Valid data types: DateTime, Decimal, Integer, String
When to Use
This is a continuous maximum, that is, it takes into account that between the start of the time range and the first point within the range, the expression held its previous value and that value should be included in calculating the maximum.
Examples
Expression: ContinuousMax_Sampled(Expr, Time() - 60, Time())
Result: Maximum over the last minute (60 seconds).
Expression: ContinuousMax_Sampled(Expr, Time() - 60)
Result: Maximum over the last minute (60 seconds).
Expression: ContinuousMax_Sampled(Expr, Midnight(Time()))
Result: Maximum since midnight (the start of the day).
Expression: ContinuousMax_Sampled({tag, sampleMethod = "Raw"}, Time() – 60)
Result: Maximum of the raw values over the last minute.
Expression: ContinuousMax_Sampled(Sampling(Expr, "raw"), Time() - 60)
Result: Maximum of the raw values over the last minute.