2 Replies Latest reply on May 10, 2009 3:28 AM by zifbox

    incorrect calculation



      incorrect calculation



      I have 3 fields. Amount, Tax, Total. 

      The Tax field is a calculation field. It calculates a value based on the number in the Total field (that is, Total/11).

      The Amount field is a number field with a calculated value, that is Tax - Total.


      I type in the number in the Total field and I get a number in the Amount field the same as the Total field, which is incorrect. If I delete the number in the Amount field (or change it in any way) then the calculation is made correctly.


      It seems to me that the Amount calculation is done before the Tax calculation which produces an incorrect result.


      How can I fix this? Any ideas?




        • 1. Re: incorrect calculation

          Hi ngr


          I would need your calculation to amend, but I think you can manage it after the explanation.


          The formula to add Tax to Amount is different from the one to extract it from Total. You will need to include both in your calculation in a If or Case instruction. Something like - If ( empty Amount field and not empty Total; extract; add ).


          Makes sense?



          • 2. Re: incorrect calculation

            Hi KIDO,

            The problem was actually with a calculation I had in the Total field.

            Once I removed it, it works fine. You are right, I will need to user some kind of if or case statement.


            Thanks for you help.