- Datagration Knowledge Base
- P#
- Moving Window Functions
-
Getting Started
-
Customer Training
-
Customer Success
-
Updates
-
Production Optimization
-
Completion Optimization
-
Environmental, Social & Governance
-
Development, Acquisition & Divestitures
-
Enhanced Oil Recovery
-
Admin
-
P#
- Getting Started with P#
- Data Cleansing
- String Functions
- Scenario Functions
- Regression Functions
- Placeholder Functions
- Neighborhood Functions
- Mathematical Functions
- Logic Functions
- Entities Function
- Moving Window Functions
- Time and Date Functions
- Statistical Functions
- Economic Functions
- Data Handling
- Additional Functions
- Directional Functions
- Machine Learning Functions
- DCA Functions
-
Packages
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 |
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 |