Get the average of selected sub-fields in an Input Table field

  • Brother2Brother
    Asked on July 4, 2017 at 4:33 PM

    Hi, I am having difficulty with the form calculation for a satisfaction survey where V. Satisfied=4, Satisfied=3, Neutral=0, Dissatisfied=2 and V. Dissatisfied=1. Also, what would be the best way to display this data (i.e., pie, chart, etc) I'd like to see the number of responses for each question.

    Please help. Thanks.

  • David JotForm Support Manager
    Replied on July 4, 2017 at 6:01 PM

    You simply need to create a Visual Report: https://www.jotform.com/help/187-How-to-Create-a-Visual-Report-with-Your-Form-Submissions 

    For the calculation, you need to assign the values to each option, please check this guide: https://www.jotform.com/help/301-How-to-Assign-Calculation-Value 

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

    Let us know if you need more help.

  • Brother2Brother
    Replied on July 9, 2017 at 9:37 AM

    Hi BDAVID,

    I've added the calculation block to my form but it is not adding up correctly.  Not sure what I'm doing incorrectly.  Also it shows the person who completes the form the calculations as well.  Is it supposed to do that?  I want the report to show me the number of satisfied for all the respondents, the number of very satisfied, etc.  Will it do that or do I have to download all the calculations and add them manually?

     

    Very Satisfied=5, Satisfied=4,  Neutral=3, Dissatisfied=2 and Very Dissatisfied=1

    I have 2 rating questionnaires.  I am sharing just 1 with you.  I am also sharing the calculations page as well.  

    Get the average of selected sub fields in an Input Table field Image 1 Screenshot 30

    Get the average of selected sub fields in an Input Table field Image 2 Screenshot 41

  • Mike_G JotForm Support
    Replied on July 9, 2017 at 11:19 AM

    If I'm understanding your concern correctly, I believe what you need is the instructions in this guide — How-to-Perform-Form-Calculation-in-the-Matrix-Field

    I see that you have already set calculation values for each sub-fields in the Input Table (Matrix field).

    Get the average of selected sub fields in an Input Table field Image 1 Screenshot 70

    However, as for getting the average, here's what you can do:

    Step 1 — add the sub-fields of the Input Table in the calculation.

    Get the average of selected sub fields in an Input Table field Image 2 Screenshot 81

    Step 2 — Move the cursor the at the beginning and add the avg () math function.

    Get the average of selected sub fields in an Input Table field Image 3 Screenshot 92

    Step 3 — Move the closing round bracket of the avg () after the last sub-field of the Input Table.

    Get the average of selected sub fields in an Input Table field Image 4 Screenshot 103

    Step 4 — Separate each sub-field with a comma and save the calculation widget.

    Note: Commas are typed manually.

    Get the average of selected sub fields in an Input Table field Image 5 Screenshot 114

    Outcome:

    Get the average of selected sub fields in an Input Table field Image 6 Screenshot 125

    I hope this helps. If you have other questions or concerns, please feel free to contact us again anytime.