Prorating
The Forecast.Current Time Period element produces its forecast by analyzing a value from the last row in the dataset and "prorating" it into the future, through completion of a specific time period.
Input Data Requirements
Data should conform to the following requirements:
- Dependent data column data should have Numeric data type
- Dependent data column data should not contain NULL values
- Independent data column should have DateTime or Date data type
- Dataset should be in ascending order by independent data column value
Method Implementation
An example, assuming Data Column value = "300", Time Period = "Month", and Current DateTime = "01/10/2014":
- Determine start of date period (current month start): 01/01/2014
- Determine the end of date period (current month end): 01/31/201
- Calculate number of seconds between date period start and current date: 01/10/2014 - 01/01/2014 = 86,400 (seconds per day) * 10 days = 864,000 seconds
- Calculate data value for one second: 300 / 86,4000 = ~0.00034
- Calculate number of seconds between current date and date period end: 01/31/2014 - 01/10/2014 = 1,814,400 seconds
- Determine predicted value by multiplying number of seconds between current date and date period end, and data value for one second: 0.00034 * 1,814,400 = ~616
- Save predicted value to column identified by Forecast Difference Column ID attribute.
- Save sum of predicted value and actual data value (300 + ~616) to column identified by Forecast Value Column ID attribute.
Results
As a result of the forecast operation, three new columns will be added to the datalayer. The names of these columns will be drawn from the element's attributes:
- Forecast Difference Column ID: this column will contain the value of the difference between the starting data value and each prorated value
- Forecast Indicator Column ID: this column will contain a boolean flag, set to True if the row contains a forecast value
- Forecast Value Column ID: this column will contain the forecast value for each row of the original dataset (if this value is left blank, the forecast values will be added to the value of the dependent Data Column)