# Matrix: one answer per column group

Suppose you want to present each survey participant with some products, services or items from which he/she selects two of them: one to which he/she assigns a positive rating and one to which he/she assigns a negative rating. For example, from a list of five colours, a participant picks a colour he/she considers less attractive and a colour he/she considers more attractive.

For this, you can include a matrix with 5 rows (with the five colours) and 2 column groups, each with only one column per group (Less attractive and More attractive) in your survey.

This example involves the colours Yellow, Red, Blue, Green and Orange. You can include these colours under Rows on the right. All colours are assigned a variable, unique value:

• Yellow = q1_1 (consisting of the question code + underscore + value 1)
• Red = q1_2 (consisting of the question code + underscore + value 2)
• Blue = q1_3 (consisting of the question code + underscore + value 3)
• Green = q1_4 (consisting of the question code + underscore + value 4)
• Orange = q1_5 (consisting of the question code + underscore + value 5)

Note: This variable value can be modified, as long as the value per question remains unique.

Subsequently, you create two column groups, leaving the fields Column group 1 and Column group 2 empty. In both column groups you define just one column: Less attractive in column group 1 and More attractive in column group 2. The question type of the rows should be set to Single response (this is the default value).

Based on the combination Colour and the rating criterion Less attractive or More attractive, the following variables are then created, among others:

• Yellow & Less attractive = q1_1_1 (consisting of the question code + underscore + value row 1 + underscore + value column 1)
• Red & Less attractive = q1_2_1 (consisting of the question code + underscore + value row 2 + underscore + value column 1)
• ……………..
• Green & More attractive = q1_4_2 (consisting of the question code + underscore + value row 4 + underscore + value column 2)
• Orange & More attractive = q1_5_2 (consisting of the question code + underscore + value row 5 + underscore + value column 2)

To retrieve these question variables (placeholders), place the cursor in the text box of the matrix question and click the Rich text editor link. Under the Placeholder icon, you can find the variables you are searching for at the matrix question under the Questions type.

To ensure that a participant can select only one answer in both columns of the matrix question, include two validation elements BEFORE the matrix question in the survey. This is where the details of the variables mentioned above are important.

For both validation elements, you can specify an error message (1), e.g. In the first column you must indicate a colour you consider less attractive. After this, you can specify the condition under which this error message is presented to a survey participant. After clicking the Edit conditions (2) button, the Filter window appears on which you could then set the following data:

• Show this validation message
• if – Calculation – q1_1_1 + q1_2_1 + q1_3_1 + q1_4_1 + q1_5_1 – != (is not equal to) – 1

In short, a participant will see an error message for the first column, if he/she has selected less than one or more than one colour in the Less attractive column. A similar validation can be set up for the second column, albeit that this calculation involves the formula q1_1_2 + q1_2_2 + q1_3_2 + q1_4_2 + q1_5_2.

Updated on June 5, 2023