154
Chapter 8
Function Result Description
@OFFSET(FIELD,EXP R, INT) Any
Performsthe same operationas th e @OFFSET function
with the addition of a third argument, INT, which
species the maximum number of values to look
back. In cases where the offset is computed from
an expression, this third argument should improve
performance.
For example, in an expression such as@OFFSET(Foo,
Month,12), the system knows to keep only the last
twelve values of Foo; otherwise, it has to store
every value just in case. In cases where the offset
value is a constant—including negative “lookahead”
offsets,w hich must be constant—the third argument
is pointless and the two-argument version of this
function should be used. See also the note about
self-referential functions in the two-argument version
described earlier.
@SDEV(FIELD) Real Returns the standard deviation of values for the
specied FIELD or FIELDS.
@SDEV(FIELD,E XPR) Real
Returns the standard deviation of values for FIELD
over the last EXPR records received by the current
node, including the current record. FIELD must
be the name of a numeric eld. EXPR may be any
expression evaluating to an integer greater than 0.
If EXPR is omitted, or if it exceeds the number of
recordsreceiv ed so far,the standard deviation ov era ll
of the records received so far is returned.
@SDEV(FIELD,EXPR, IN T) Real
Returns the standard deviation of values for FIELD
over the last EXPR records received by the current
node,including the cu rrent record. FIELD must be the
nameof a numeric eld. EXPR may be anyexpression
evaluating to an integer greater than 0. If EXPR
is omitted, or if it exceeds the number of records
received so far,the standard deviation over all of the
records received so far isr eturned. INT species the
maximum number of values to look back. This is far
more efcientthan us ing just two arguments.
@SINCE(EXPR) Any Returns the number of records that have passed since
EXPR,a n arbitrary CLEM expression, was true.
@SINCE(EXPR, INT) Any
Adding the second argument, INT, species the
maximum number of records to look back. If EXPR
has never been true, INT is @INDEX+1.
@SINCE0(EXPR) Any
Considersth e current record, while @SINCE does not;
@SINCE0 returns 0 if EXPR is true for the current
record.
@SINCE0(EXPR, INT) Any Adding the second argument, INT species the
maximum number of records to look back.
@SUM(FIELD) Number Returns the sum of values for the specied FIELD
or FIELDS.