Matrix, constant sum, custom validations | XM Community
Question

Matrix, constant sum, custom validations

  • 30 July 2020
  • 1 reply
  • 28 views

Userlevel 3
Badge +8

Hi everyone,
I am asking a constant sum question in a survey. One column needs to equal 100% while the other two columns need to equal a particular sum.
I cannot figure out how to provide custom validation for this question. Does anyone have ideas? Also, I need to add force response to this question as well.
Screen Shot 2020-07-30 at 5.39.07 PM.pngThank you!


1 reply

Userlevel 7
Badge +22

We need to use custom validation here.
For example the custom validation for first column sum = 100 will be:
option A_Percentage = $e{ 100 - ( option B_Percentage + option C_Percentage ) }
So in the custom validation pop up, in the last box, you can put the math operation as shown above, which will be similar to below
option A_Percentage equal to $e{ 100 - ( q://QID505/ChoiceNumericEntryValue/2/1 + q://QID505/ChoiceNumericEntryValue/3/1 ) }

Leave a Reply