MovingSum

Moving sum of a freely definable range.

The function calculates the sum of the elements within the range defined by the user via number of data points before and after the actual time step. In case of entering zero data points before and after the output is a copy of the input.

Syntax

 MovingSum(expression, # of data points before, # of data points after)
  • expression: signal expression
  • # of data points before - integer number of points in the signal expression before the current date in the aggregation range
  • # of data points after - integer number of points in the signal expression after the current date in the aggregation range

Example

 MovingSum("produced water per time increment" in "STB", 1, 1)

As you see in the following table the MovingSum with 1 data point back and 1 data point forward in time produces following output based on the 'original signal' as input:

 

Date/Time

 

Original Signal

 

MovingSum
1 datapoint backwards in time
1 datapoint forward in time

01.02.2007 00:00

8

8

01.03.2007 00:00

0

23

01.04.2007 00:00

15

37

01.05.2007 00:00

22

61