How to get the Average calcuations for IF/hidden and NA fields?

  • Profile Image
    rebrokeraz
    Asked on May 21, 2019 at 10:40 PM

    Hello,

    Two part question. First, I need help calculating an average score on my form. I have If statements built in, so there are times some of the fields in the calculation will not be in use. It appears the avg equation is counting the hidden fields. 

    Second, is there a way to have the avg equation not factor in the field when the "NA" radio is selected.

    Here is the form: https://form.jotform.com/91403883348159https://form.jotform.com/91403883348159https://form.jotform.com/91403883348159

    Any help would be appreciated!

    Marcus

  • Profile Image
    Welvin
    Answered on May 22, 2019 at 02:06 AM

    In the calculation options, you have the option to ignore hidden fields. I did that for you. Would you mind checking again?

    15585051622019-05-22-002.png

    As for the N/A, put 0 or no calculation value at all. Please try that. 

  • Profile Image
    rebrokeraz
    Answered on May 22, 2019 at 11:29 AM

    Hi Welvin,

    Thank you for the quick reply. I made that change and it appears to still factor the hidden fields into the equation.

    Could the issue be related to the IF conditions? Below is an example of what I have setup.

     1558539380screenshot_258.png

  • Profile Image
    Kiran
    Answered on May 22, 2019 at 12:57 PM

    I have cloned the form and removed the page breaks to check the calculation value. As I tested the form, the calculation seems to be varying while I change the options on the form. However, I am not sure if the calcuation is correct or now. You may try changing the option for 'Clear Hidden field values' in the form settings to 'Clear on Being hidden'.

    155854411822052019_220503.png

    Also, please using the avgNoZero() instead of avg() and see how it goes.

    Please get back to us if you need any further assistance. We will be happy to help. 

  • Profile Image
    rebrokeraz
    Answered on May 22, 2019 at 01:48 PM

     Thank you... those two options didn't do the trick either. I ended up giving the "no" answers a value of 0.3 and everything works perfectly. Looks like the "0" value for the "no" answers was throwing off the equations.

    I appreciate all the support!