Skip to Content
0
Former Member
Oct 29, 2010 at 06:59 AM

Strange formula behavior ... bug ?

26 Views

Hello

I am making tests for Budget implementation.

Here is the context :

Accounts :

A_TECH_A

A_TECH_B

A_TECH_C = A_TECH_A / A_TECH_B

I want, in budget, to be able to make data entry directly for A_TECH_C value.

So I created an other account A_TECH_C_BUD

And put this formula in A_TECH_C

IIF(CATEGORY=ACTUAL,IIF(A_TECH_B=0,0,A_TECH_A / A_TECH_B),A_TECH_C_BUD)

I would like to be able to catch the 0 value of B to avoid the "0 division" and put 0 in C.

This formula works well, and I tried those values in an EVDRE :

ACTUAL BUDGET

A 4

B 2

C 2 (calc) 10 (calc)

D 10

But if I now put a 0 for B, then the calculation for ACTUAL is correct because I see 0, but I also see 0 in BUDGET ! which is not the required behavior.

It seems that the formula to test the 0 replaces the first test for ACTUAL.

Is it possible to mutiply the IIF conditions like I made or not ?

Thank you very much and tell me if something misses in my explanations.