What is JotForm?
JotForm is a free online form builder which helps you create online forms without writing a single line of code. No sign-up required.

At JotForm, we want to make sure that you’re getting the online form builder help that you need. Our friendly customer support team is available 24/7.

We believe that if one user has a question, there could be more users who may have the same question. This is why many of our support forum threads are public and available to be searched and viewed. If you’d like help immediately, feel free to search for a similar question, or submit your question or concern.


  • Profile Image

    Calculating overall average from submission database

    Asked by TeamEP on April 09, 2017 at 02:41 PM

    Hi,

    I want to take average of all the submissions of users, like user a results, user b results and.... so on results are averaged and shown either in responder email, or in a report. 

     

    So right now im my form, I've taken average of 15 questions, and send result to users via respondent. Now I want that user can also see the overall average of the database for those 15 fields as a SINGLE UNIT. 

     

    Looking for your valuable suggestions in this regard

    Thanks

    Page URL:
    https://form.jotform.me/70718981183464

  • Profile Image
    JotForm Support

    Answered by Mike on April 09, 2017 at 04:05 PM

    There is no direct way to calculate average from submission database. 

    It should be possible to use custom programming in combination with JotForm API to calculate average and show it on a thank you redirect page.

    In theory, it might be also possible to use Google Spreadsheet service to calculate and display average.

    1) Integrate form with the Google Spreadsheet service.
    2) Calculate average on that sheet (see this google thread).
    3) Share a cell/sheet in embed mode (see this google thread)
    4) Embed the share code to your form Thank You Page.

    Although, this is not something that has been tested.

  • Profile Image

    Answered by TeamEP on May 29, 2017 at 12:02 AM

    Hi Mike, thanks for your reply. I integrated google sheet and displayed the overall average as a pie chart. There were 2 issues I faced.

    When I displayed pie chart on sheet, jotform didnt updated the next submissions. That's because I studied treats and came to know if we touch spreadsheet after connection, the connection disturbs and breaks further sheet updation.

     

    The second issue I faced was I got the link of the chart, through insert (get chart link) option from google sheet. It was a iframe code. I inserted that code into email notification of user and the chart was shown in notification editor but when I did test submission the pie chart was not being displayed in mail.

     

    ----

     

    Now that I want to display simple overall average of all users submission as text but I'm finding no way to get it's code and input it in notification editor. 

     

    Please look into this matter, I'm sure you will help me out getting solve the issue.

     

    Many thanks

     

  • Profile Image
    JotForm Support

    Answered by ashwin_d on May 29, 2017 at 01:23 AM

    Hello,

    When I displayed pie chart on sheet, jotform didnt updated the next submissions. That's because I studied treats and came to know if we touch spreadsheet after connection, the connection disturbs and breaks further sheet updation.

    Please note that you should not edit the column header of integrated google spreadsheet which will cause the integration to break. I would suggest you to please go ahead and add a new sheet to display pie chart in the integrated google spreadsheet and see if that solves your problem.

     

    The second issue I faced was I got the link of the chart, through insert (get chart link) option from google sheet. It was a iframe code. I inserted that code into email notification of user and the chart was shown in notification editor but when I did test submission the pie chart was not being displayed in mail.

    Please note that if you embed iFrame embed code in email, most likely it won't work in majority of email client. iFrames often contain scripts, so most email clients block them. I would suggest you to please add a link to your pie chart in email alert instead of adding iFrame code.

    Thank you!