Hello,
can you give me some advice, please?
I have 20 questions in Typeform with 1-5 answer choices (I use the "Opinion Scale" type). After filling in all the answers, I need to calculate the arithmetic average of the answers and then display a rating page at the end of the questionnaire based on the resulting number. (there is always a different final page for number 1,2,3,4 and 5)
In excel I would use the formula "=AVERAGE(A2:E21)", but how to calculate it in Typeform?
Thank you for your help!
Answered
How to calculate the arithmetic average of the answers?
Best answer by john.desborough
- create a variable call it v_total as numeric with default of 0
- in q1 your logic rules would be something like this:
- if q1 = 1 then add 1 to v_total
- if q1 = 2 then add 2 to v_total…
- repeat for for each question - this will add the selected number from each answer to the variable
- then at the end you create this logic rule:
- if v_total is greater than 0 then divide v_total by X (where X is the number of questions)
- then you can use the @recall function to display the average - @v_total will now be the average (total of all the points divided by the number of questions
hope that helps
Reply
Enter your E-mail address. We'll send you an e-mail with instructions to reset your password.