POST function within IF THEN ELSE construct

Highlighted
New Contributor

Re: POST function within IF THEN ELSE construct

i tried it ....not able to get the results.

 

Occasional Contributor

Re: POST function within IF THEN ELSE construct

Here is the test I did:

dgingras_0-1589464257641.png

Isn't this what you are looking for?

Highlighted
New Contributor

Re: POST function within IF THEN ELSE construct

But Actually....if the condition is true in APR 20 means ,i want  post those Line Item  values inJUN20.

 

Highlighted
Occasional Contributor

Re: POST function within IF THEN ELSE construct

The POST, LAG, OFFSET function all take a value from a prior or future period and put it in the current period. So if you want to put a value in June based on a condition set in April, you need to test that condition in the prior period. I believe this will give you what you want:

IF PREVIOUS(PREVIOUS(Boolean)) THEN POST(Volume, 2, 0) ELSE 0

Highlighted
New Contributor

Re: POST function within IF THEN ELSE construct

Thanks for the information... 

But when i working with POST Function without if condition it gives proper reuslts.

it will post the results in Prior to the cells as well as previous cells.

 

Post Function  :  POST(Volume,2)

                           Jan20   Feb20   Mar20  Apr 20  May 20

Volume                  10        20         30        40         50

Post  Function                                10       20         30  

  

Highlighted
Occasional Contributor

Re: POST function within IF THEN ELSE construct

The POST function is not pushing the value from Jan to Mar, it is pulling the value from Jan to Mar. The reason there are no values for Jan and Feb is that the source period is outside the date range.

Highlighted
New Contributor

Re: POST function within IF THEN ELSE construct

In that Above Example ...We can post  the present cell value to the prior cells....

POST Function will post the present value to the prior/previous to the cells....

Highlighted
Occasional Contributor

Re: POST function within IF THEN ELSE construct

Try this, it should clarify how the POST function works.

 

IF Boolean THEN POST(Volume, 2, 0) ELSE POST(Volume, -1, 0)

 

Hope this helps.

Highlighted
Valued Contributor

Re: POST function within IF THEN ELSE construct

Hi Everyone,
@dgingras @Srinivas_Gudi 

I'd like to correct some of the information I saw in this thread, even if you have figured out the issue, future contributors who read this will not be confused.
"The POST, LAG, OFFSET function all take a value from a prior or future period and put it in the current period"

This is not accurate.

 

POST differs from LAG and OFFSET because it actually takes the value from the current period and put it in a future or prior period.

I consider POST as a PUSH while OFFSET and LAG  are a PULLimage.png

I generally find the technical explanation of Anapedia confusing - until they provide an example. In the case of POST, I believe the first line of the description is wrong, best-case scenario it is very misleading
POST (Anapedia)
Returns the value in a line item from a future or previous period based on a positive or negative offset value.

It should be
Returns the value in a line item TO a future or previous period based on a positive or negative offset value

I also believe that the formula 

Einas
"Give a Man a Fish, and You Feed Him for a Day. Teach a Man To Fish, and You Feed Him for a Lifetime"
Highlighted
Occasional Contributor

Re: POST function within IF THEN ELSE construct

Thanks Elinas for correcting my error, after I posted it I realized that was wrong but forgot to correct.  I couldn't agree more with you that the documentation is confusing.  To add to the confusion, when another line item is updated and it causes the re-evaluation of all line items, it makes it appear, to me at least, that the POST works differently than it actually does.