The POST function pushes a value a set number of periods into the future.
To calculate the value of a target cell for a particular time period (PTp), POST does the following for every time period (ETp):
- Executes the offset expression for the corresponding cell of the source for ETp.
- If the result of the offset is equal to the number of periods that ETp lags behind the PTp, then it executes the source expression at ETp and adds the result to the target at the PTp.
You could use POST to determine how much stock is arriving at a warehouse for separate time periods. From the example below, POST would be applied to the line item 'stock.'
POST(line item or expression, Offset amount)
POST(IF Order? THEN Order Volume ELSE 0, Shipping lead time)
|Line item or|
|Number||Value to be posted|
|Offset amount||Numeric line item, property, or expression||Number of periods forward|
POST(IF Order? THEN Order Volume ELSE 0, Shipping lead time)This formula calculates the Monthly stock received.
The table below illustrates a simple, constant, POST offset. Delivery by bike takes three months, by truck, two months.
If Order = Yes, then the value in Order Volume is posted in the Monthly stock
received row, offset by the number of periods cited in the Shipping lead time row.
|Monthly stock |
- POST can result in more than one source value being posted to a target period.
- POST is only applicable to numbers.
- Do not use POST for simple data offsets. OFFSET, LAG, or MOVINGSUM are more efficient.
- If the offset expression is negative, then POST returns the number of periods ahead.
- The time range providing arguments to a line item must match the time range for the result line item. Any formula that conflicts with this rule will be rejected. For more information, see Search page.
- A non-time series function, used as a sub-expression of this function, must use the same time range as the line item to which the formula is applied. Combining time series functions and non-time series functions with a time range could return an unexpected result or an error message. For more information, see Time Ranges and Time Series Functions page.
POST with a constant offset
For a constant offset LAG and POST behave in the same way. The offset is constant for each target period so there's only one source period that POSTs into it.
POST with a variable offset
For a variable offset, LAG uses the value of the offset from the target time period. POST however uses the value of the offset from the source. As more than one source period can have an offset that points to the same target period, the values for all such source periods are added to give the target value. Below the offsets for Jan, Feb and March all point to March, thus the value for March is the sum of the source values for Jan, Feb, and March.
POST with a conditional offset
For a conditional POST, we POST a value when a condition is met. The logical method to express this is (IF condition, then POST(...)) does not work as expected. This is because the formula expresses the value at the target period and it's the target value of the condition that is used. This controls the entire value of the target. To get the correct usage, evaluate the condition inside the POST call. Everything inside the POST call is evaluated at the source. In the case below, since the source condition is true then the source value is added to any others included in the POST to the target.