During the creation of the questionnaire, in the 'EDIT' – 'Questionnaire' tab, you can use a calculation to define automatically calculated values based on the respondents' answers.
This feature is especially useful with quizzes and tests, where you are interested in the score (number of points) based on the values of individual answers. An example of use in a survey would be the calculation of a respondent’s age based on their year of birth.
You can add a calculation in the 'EDIT' – 'Questionnaire' tab by clicking on the blue plus icon in the left-hand menu, which will open All question types. Select 'Calculation' from the 'Advanced features' category. This will open a pop-up window for editing the calculation:
- First, choose a variable from the dropdown menu (e.g. Q1);
- Then specify the desired operation, where you can choose between addition, substraction, division and multiplication;
- Select another variable from the next dropdown menu. For example, you can set the calculation of Q1 + Q2;
- If you wish to include several operations and variables, repeat these steps.
The following advanced settings can also be used when editing calculations:
- If you select the option 'Number' instead of the variable, this allows you to perform calculations with constants (e.g. multiply the variable Q1 by 10);
- You can change the order of the variables by clicking on the vertical double-headed arrow icon on the left and dragging the variables to the desired position. You can also remove a variable from the calculation by clicking on the trashcan icon to the right of the variable;
- To the left and the right of each variable, you will find plus and minus-shaped icons (Brackets), which allow you to edit brackets and ensure the correct order of arithmetic operations with complex calculations;
- In the bottom left corner ('Variable name'), you can rename the calculation. In the question text, you can also insert the value of the calculation by entering #computation_name#;
- In the bottom left corner (under the 'Variable name' field), you can determine the number of decimals for the calculation (from 0 to 10).
With quizzes and tests, you might want to set the value of individual answers (e.g. 1 for correct answers and 0 for incorrect answers) before you set up calculations. To change the answer values, click on the advanced editing icon, select the option 'Edit values' and enter the appropriate value to the left of the individual answer (e.g. 1 for correct answer and 0 for incorrect answer).