Need help with a calculation

  • Profile Image
    nystea
    Asked on September 28, 2017 at 02:29 PM

    Hi,

    I am trying to count the number of students vs adults, along with tracking gender. 

    The form transmits to the user correctly for total students attending (30 in the one submission currently on file). It shows up as a formula on the results page.

    If (=1) +1, +0), If (0=1, +1,+0)

    and then 

    1100092

    as the total of male students attending. As far as I can tell, the formulas are correct. I can't figure out why the results are wonky. 

    Any help would be appreciated. I have about 800 students registering in the next several weeks and prefer not to have to manually do the calcs.

    Thanks


  • Profile Image
    Kevin_G
    Answered on September 28, 2017 at 03:51 PM

    As I can understand, you're getting the following result on your calculation widget labeled "Total All Students Attending": If (=1) +1, +0), If (0=1, +1,+0)

    But I have just checked your form and noticed you have a calculation on that field: 

    Please note that if you're trying to add a formula like this "If (=1) +1, +0), If (0=1, +1,+0)" then it's not possible. 

    I would recommend you to check the following guides about calculations: 

    https://www.jotform.com/help/259-How-to-Perform-Form-Calculation-Using-a-Widget 

    https://www.jotform.com/help/268-Conditional-Logic-Inserts-Text-Calculation-Into-A-Field

    https://www.jotform.com/help/267-Form-Calculation-Math-Function-Reference 

    https://www.jotform.com/help/301-How-to-Assign-Calculation-Value 

    Also, I noticed that you form has the formula as predefined value: 

    Please make sure the auto-fill feature is not enabled, otherwise the previously entered data will appear until you submit the form: https://www.jotform.com/help/227-How-to-Enable-Auto-Fill-on-Forms 

    I hope this helps.