The POST function offsets, or posts, a numeric value into the past or the future by a given number of periods. If multiple values are offset to the same period, the POST function adds them together.
You could use POST to determine when stock arrives at a warehouse given a certain lead time.
Syntax
POST(Value to post, Offset amount)
Arguments
Argument | Data Type | Description |
Value to post | Number | The value to post to another period. |
Offset amount | Number | The number of periods to post into the past or future. Can be a positive or negative number, or zero. A positive number posts a value into a future period. A negative number posts a value into a past period. A zero value keeps the value in the associated period. |
The POST function returns a number.
Calculation engine functionality differences
In Polaris, you cannot use POST in formulas of line items with a formula summary method. In the Classic Engine, you can.
Syntax example
POST(Order Volume, Shipping Lead Time)
Constraints
- The result line item must have a Time Scale.
- The time range used for any values used as an argument for the POST function must be the same time range used for the result line item.
Examples
Simple example
This example uses the POST function to offset the Order Volume line item for each month by a Shipping Lead Time line item. The value of the Shipping Lead Time changes each period, which means the value of the Order Volume line item that the POST function returns also changes each period.
Jan 22 | Feb 22 | Mar 22 | Apr 22 | May 22 | Jun 22 | Jul 22 | Aug 22 | |
Order Volume | 100 | 50 | 0 | 300 | 0 | 175 | 50 | 0 |
Shipping Lead Time | 3 | 2 | 0 | 0 | 0 | 0 | 3 | 0 |
Monthly Stock
| 0 | 0 | 0 | 450 | 0 | 175 | 0 | 0 |
Example of POST with a conditional offset
You can use the POST function with the IF THEN ELSE function to create a conditional formula. However, if you do this, ensure to position the two functions appropriately within your formula.
In this example, separate line items contain the Value to post, Offset amount, and the Boolean condition that determines if a value should be posted.
The formula can contain the POST function within the IF THEN ELSE function. In this case, a value is only posted in periods where the Boolean condition is TRUE. However, the posted value can come from any of the values of the Value to post argument, irrespective of the Boolean condition.
Alternatively, the formula can contain the IF THEN ELSE function as part of the Value to post argument of the POST function. In this case, values are posted into all periods. However, the posted value can only come from periods where the Boolean condition is TRUE.
Jan 22 | Feb 22 | Mar 22 | Apr 22 | May 22 | Jun 22 | Jul 22 | Aug 22 | Sep 22 | Oct 22 | Nov 22 | Dec 22 | |
Value to post | 1 | 2 | 4 | 10 | 20 | 40 | 100 | 200 | 400 | 0 | 2,000 | 4,000 |
Offset amount | 2 | 1 | 0 | 2 | 1 | 0 | 2 | 1 | 0 | 2 | 1 | 0 |
Boolean condition | ||||||||||||
IF Condition THEN POST (Source, Offset) ELSE 0 | 0 | 0 | 7 | 0 | 0 | 0 | 0 | 0 | 700 | 0 | 0 | 0 |
POST(IF Condition THEN Source ELSE 0, Offset) | 0 | 0 | 5 | 0 | 0 | 20 | 0 | 0 | 500 | 0 | 0 | 2,000 |