Calculating overall average from submission database

  • TeamEP
    Asked on April 9, 2017 at 2: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

  • Mike
    Replied on April 9, 2017 at 4: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.

  • TeamEP
    Replied 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

     

  • Ashwin JotForm Support
    Replied on May 29, 2017 at 1: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!