Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Formula Calculation Help - Exponential Rate

New Here ,
Mar 23, 2022 Mar 23, 2022

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

 

 

 

1.3K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
1 ACCEPTED SOLUTION
Community Expert ,
Mar 24, 2022 Mar 24, 2022
event.value = A * Math.pow(1+(B/100), C);

View solution in original post

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 23, 2022 Mar 23, 2022

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

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 23, 2022 Mar 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.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 23, 2022 Mar 23, 2022

Oh thank you! Adobe Acrobat 😉 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 23, 2022 Mar 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);

 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 24, 2022 Mar 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?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2022 Mar 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+="%";

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 24, 2022 Mar 24, 2022

Hi! Thank you so much. Here is my hang-up. The value 'B' is entered as a percentage, i.e. '10.5%' but then the formula doesn't compute correctly. In the formula, it needs to correct '10.5' to '0.105' to work correctly. Do you know how to create a script that would correct that? See snip below... 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2022 Mar 24, 2022

Divide the R-value by 100.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 24, 2022 Mar 24, 2022

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. 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Community Expert ,
Mar 24, 2022 Mar 24, 2022
event.value = A * Math.pow(1+(B/100), C);
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Mar 24, 2022 Mar 24, 2022
LATEST

Thank you SO incredibly much. You have been so helpful! This worked 😉 

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines