Difficulty level: Difficult
What does the functionality do?
Suppose you have a matrix question consisting of, for example, 5 rows and 2 columns. In the first 4 rows of this question, you want the survey participant to rate the services AAA, BBB, CCC and DDD with a number of points. However, the total of all points provided for the services AAA, BBB, CCC and DDD must be equal to 100. This total is continually updated in the fifth row. A participant can assess these services for two or more companies, departments, etc. separately (here: column Company A and Company B).
The minimum number of points to be allocated by a participant to a service is 0; the maximum number of points for each service is 100.
Use case and how to set it up?
Each survey question has a variable screen code. For example, the variable screen code of this matrix question is q2. The five rows in this matrix question each have a separate variable suffix: AAA = 1; BBB = 2; CCC = 3; DDD = 4 and EEE = 5. The Company A and Company B columns are assigned the suffixes 1 and 2 respectively. For both columns the response data type Integer number, the minimum value 0 and the maximum value 100 must be specified (see below).
In order for the total number of points to add up to 100 in both columns of the matrix question, you must include two value assignments BEFORE the matrix question in the survey. For this, the data of the variable screen code and the row & column suffixes are relevant.
The above-mentioned value allocations can be interpreted as follows:
- q2_5_1 = question screen code – row 5 (Total) – column 1 (Company A). For q2_5_1, it concerns the total of points (which must be 100) provided by a survey participant for all services AAA (q2_1_1) up to DDD (q2_4_1) in the Company A column.
- q2_5_2 = question screen code – row 5 (Total) – column 2 (Company B). For q2_5_2, it concerns the total of points (which must be 100) provided by a survey participant for all services AAA (q2_1_2) up to DDD (q2_4_2) in the Company B column.
For both value assignments, the following execution option can be selected:
- Anytime (immediately after every change to an involved variable)
Two validation elements can then be inserted into the survey straight AFTER the matrix question: one for the total calculation in the Company A column and one for the total calculation in the Company B column.
You can enter an error message in the validation elements, e.g. The total number of points in the Company A column must be equal to 100. You can then specify the condition under which this error message is displayed to a survey participant. After having clicked on the Edit conditions button, the Filter window appears where you can indicate, for example, the following data:
- Show this validation message
- if – Calculation – q2_5_1 – != (is not equal to) – 100