Form calculation is returning the formula

  • alexmichaelbarker
    Asked on February 1, 2021 at 3:17 PM

    hello

    I'm trying to create a salary comparison calculator for a popular blog.

    I can't seem to figure out the calculator for my form


    Example:

    1 - place salary here

    2 - formula: (place salary here) / $125,024 %

    but when I preview the form, it gives me this as the answer:

    140000/125024%

    it was once working properly, but now the answer just gives the formula.


    link to form:

    https://form.jotform.com/210315901459047


    However, another problem occurs when the 1 answer is less than the $125,024, as it no longer portrays a comparison percentage, but a percentage of the total

    example:

    $80000/$125,024 = 64%

    instead, I want it to be 36% lower than the average

  • Lorenz JotForm Support
    Replied on February 1, 2021 at 9:30 PM

    Greetings,

    but when I preview the form, it gives me this as the answer:140000/125024%

    Upon checking your form, it returns the formula because you have the division operator set as a string.

    See the image below.

    1612231996 6018b53c22809 test   2021 02  Screenshot 10

    Kindly click the division operator and make sure it is not set to string.

    However, another problem occurs when the 1 answer is less than the $125,024, as it no longer portrays a comparison percentage, but a percentage of the total.

    I'm quite not sure if that's an issue. I tested your inputs using a device calculator ($80000/$125,024) and the result is just the same (64%).

    Can you please elaborate more?

    We will wait for your response.

  • alexmichaelbarker
    Replied on February 1, 2021 at 10:44 PM

    I deselected the division, but now my answers simply come in parenthesis, and without a percentage


    Here is the calculation I want:

    Examples:

    $140,000/ $125,024 = 11.9% (higher than average)

    $100,000/$125,024 = -20% (lower than average)

    I do not understand how to create a calculation that will give me this result.


  • claire
    Replied on February 2, 2021 at 3:01 AM

    I cloned your form, and I tested it on my end. Since the parentheses you use in your Form Calculation widget appear as String, your answers come in parentheses. Kindly recommend you delete the parentheses from your widget, then click the % icon to set it String instead of Number. I prepared a screencast for you from my cloned form.

    1612252847 601906af2007e  Screenshot 10

    Please give it a try and let us know how it goes. We will wait for your response.

  • alexmichaelbarker
    Replied on February 2, 2021 at 8:46 AM

    thank you;

    I changed your formula and received this result for

    140000

    1612272793 60195499015f6 Screen Shot 202 Screenshot 10

    and for 100,000

    1612272793 60195499213c8 Screen Shot 202 Screenshot 21


    this is not the result I want.


    How can I change the formula to represent the change in percentage?

    140,000/$125,024 (%)- 1= 12%

    100,000/$125,024 (%) -1 = -20%


    1612273146 601955fa18306 Screen Shot 202 Screenshot 32

    unfortunately, these are the results I received

    140000

    1612273217 6019564127537 Screen Shot 202 Screenshot 43

    100000

    1612273236 601956543a337 Screen Shot 202 Screenshot 54

    so then I tried,

    1612273490 6019575281ec2 Screen Shot 202 Screenshot 65

    but then I got an incorrect answer. I wanted it to be 11.9%

    1612273468 6019573cb243d Screen Shot 202 Screenshot 76


    how do I make a formula that works?

  • Gaetan_B
    Replied on February 2, 2021 at 9:58 AM

    Hello,

    Thank you for the additional details.


    Could you make your Calculation look exactly like the following:

    1612277904 60196890a3528  Screenshot 10


    Hope this helps.

    Do not hesitate to reach out if you need further assistance

  • alexmichaelbarker
    Replied on February 4, 2021 at 8:41 AM

    thank you all; this fixed my formula