POST function within IF THEN ELSE construct

Highlighted
Contributor

POST function within IF THEN ELSE construct

In a model I'm working on I need to use the post function.  When I put it by itself in the formula it works fine.  But since I only want to use it when a certain condition is met, I changed the formula to: if NOT lineitem then 0 else post(x,y).  With this syntax, all I get is 0s. Is this a known issue?

 

Thanks

19 REPLIES 19
Highlighted
Master Anaplanner/Community Boss

Re: POST function within IF THEN ELSE construct

Hey - Can you confirm that your boolean line item is getting satisfied?  I have put together an example below and seems to operate as expected.  Is your setup similar? 

 

post_example.png

Thanks.


Jt

Contributor

Re: POST function within IF THEN ELSE construct

the structure I have is similar except that the offset amount comes from a number formatted line item.

 

Thanks for the quick response!

Highlighted
Contributor

Re: POST function within IF THEN ELSE construct

I figured out the issue.  The POST is working but I have think about my condition.  The way I have it now, if the condition is satisfied in week1 but not in week2, the formula in week2 override the posted value with 0.  Thanks for your help.

Highlighted
New Contributor

Re: POST function within IF THEN ELSE construct

hey ---when i working with post- if conditon ...not able tp get the proper results..

when i use only post function it give sproper results...

Highlighted
Certified Master Anaplanner

Re: POST function within IF THEN ELSE construct

Hi @Srinivas_Gudi ,

 

It could be related to a lot of things, but in principle it should work.

 

Have you considered breaking up the formula in multiple parts? By using a separate line item for the value if true, value if false and the actual IF-condition it typically helps you to structure.

 

All the best,

Maarten.

Highlighted
New Contributor

Re: POST function within IF THEN ELSE construct

Have Taken 3 Line Items;

Volume and Post Function are  Number Format, Boolean Is Boolean Format.

 

Post Function : IF Boolean THEN POST(Volume,2) ELSE 0

 

                                JAN 20  FEB 20   MAR 20  APR 20    MAY20   JUN20

Volume                :      10          12         14            16              18           20

Boolean               :                                  T            T

Post Function.     :                                 10          12

 

Why the results are coming like this. 

 

Whenever Boolean Condition Is true , post the volume line item values into further cells. it means third column is true so  want to post volume results in may20.

Highlighted
Certified Master Anaplanner

Re: POST function within IF THEN ELSE construct

@Srinivas_Gudi ,

 

Are you referencing the line item with the post function or the post function itself? 

 

 

Highlighted
New Contributor

Re: POST function within IF THEN ELSE construct

Am referencing the volume line item in Post function 

 

Highlighted
Occasional Contributor

Re: POST function within IF THEN ELSE construct

If you want to see 14 in May20, try LAG(Volume,2,0).  POST is working correctly.