SumSlotByCol and SumSlotByColSkipNaNs

Description

The sum the values in a column of a slot over a range of time.

Type

NUMERIC

Arguments

Type

Meaning

1

SLOT

the Agg Series Slot or periodic slot to sum

2

DATETIME

the start date

3

DATETIME

the end date

4

NUMERIC

the column (interpreted as a 0-based integral index)

Evaluation

The function loops through all of the slot values in the given column between the start and end datetime arguments. Each value is added to the previous result.

Mathematical Expression

 

Comments

If the slot is an Agg Series Slot and the starting or ending datetime argument is not defined in the slot, this function aborts the run with an error.

For the SumSlotByCol function, if one of the slot values in the time range is a NaN, the function forces an early termination of the calling rule. The "SkipNaNs" variation treats an invalid value (NaN) as 0.0.

For periodic slots, the dates used are those within the range and falling on a run timestep.

 
SumSlotByCol(Data.Coeff, @"January 1, 1999", @"September 30, 1999", 2)
 
25.323