Format
Count_Sampled(Expr ,StartTime [,EndTime])
Returns
Returns the number of samples in an expression over a range of time.
Inputs
Expr: The expression whose values should be counted.
Behaviour: Required
Dimension: Collection
Valid data types: Boolean, DateTime, Decimal, Integer, String, Duration, Error, Null
StartTime: The start time over which to produce the count.
Behaviour: Required
Dimension: Collection, SingleValue
Valid data types: DateTime, Decimal, Integer, String
EndTime: The end time over which to produce the count. If not specified, it assumes the current time.
Behaviour: Optional
Dimension: Collection, SingleValue
Valid data types: DateTime, Decimal, Integer, String
Examples
Expression: Count_Sampled(Expr, Time() - 60, Time())
Result: Number of samples over the last minute (60 seconds).
Expression: Count_Sampled(Expr, Time() - 60)
Result: Number of samples over the last minute (60 seconds).
Expression: Count_Sampled(Expr, Midnight(Time()))
Result: Number of samples since midnight (the start of the day).
Expression: Count_Sampled({tag, sampleMethod = "Raw"}, Time() – 60)
Result: Number of raw values over the last minute.
Expression: Count_Sampled(Sampling(Expr, "raw"), Time() - 60)
Result: Number of raw values over the last minute.