AHEAD returns value from the specified variable n slots (days, hours, minutes depending on variable type) into the future. Searches up to 183 slots ahead.
SYNTAX:
AHEADn(Vx)
where :
n is the number of slots to look ahead
Vx is a variable reference
NOTES:
This function requires the target and source variable frequencies to match. E.g. Hourly target variable = Hourly source variable, 5-Minute Target variable = 5-Minute Source Variable. If the frequencies do not match, the function will return incorrect values.
EXAMPLES:
V15 = AHEAD5(V12)
returns the value stored in variable 12, five days in the future. NOTE: V15 and V12 are daily vars.
Date |
V12 |
V15 |
1/1/2006 |
6 |
11 |
1/2/2006 |
8 |
7 |
1/3/2006 |
12 |
|
1/4/2006 |
4 |
|
1/5/2006 |
9 |
|
1/6/2006 |
11 |
|
1/7/2006 |
7 |
|
Example 2 - Get V1011 2 hours ahead into V1012 (Hourly Calc)
V1012 = AHEAD2(V1011)
See article on AdoCalc Service General Overview to enable future calculations with PERMITFUTURECALC option.