Skip to main content
Participating Frequently
March 23, 2022
Answered

Formula Calculation Help - Exponential Rate

  • March 23, 2022
  • 3 replies
  • 1339 views

I am trying to create a formula that calculates several fields in exponential growth but have yet to find the right syntax. Please help!

 

Value = A x (1 + B)^C

 

 

 

    This topic has been closed for replies.
    Correct answer try67

    You have been so kind and patient... helping a newbie out (lol)... where do I insert /100? I've tried it in the field for the percentage but also in the cumulating field and neither are yielding the correct answer. 


    event.value = A * Math.pow(1+(B/100), C);

    3 replies

    try67
    Community Expert
    Community Expert
    March 23, 2022

    You need a script. Try this:

     

    var A = Number(this.getField("A").valueAsString);
    var B = Number(this.getField("B").valueAsString);
    var C = Number(this.getField("C").valueAsString);
    event.value = A * Math.pow(1+B, C);

     

    Participating Frequently
    March 24, 2022

    Hello! This helped TREMENDOUSLY, thank you! Our field 'B' is a %... so sometimes the numbers get a little wonky if they aren't inputed as '0.00' vs. 'x%'... any clue how to combat that?

    try67
    Community Expert
    Community Expert
    March 24, 2022

    Not sure what you mean, but if it's a Percentage field you need to enter the values between 0 and 1.

    If you want the field to accept values between 0 and 100 then set the Format to Custom and apply the following code as the custom Format script:

     

    if (event.value) event.value+="%";

    Peru Bob
    Community Expert
    Community Expert
    March 23, 2022

    This is the Using the Community forum (which is the forum for issues using the forums).
    Please tell us what Adobe application you are using so that this can be moved to the proper forum for help.

    Participating Frequently
    March 23, 2022

    Oh thank you! Adobe Acrobat 😉 

    Participating Frequently
    March 23, 2022

    Value = D and it is a read-only, will only input values of A, B and C