Scoring for Muli-Select Questions and Weighted Average Calculations | XM Community
Skip to main content

I am trying to apply advanced survey logic (identifying the max score for a multi-select question and applying custom weighting in order to calculate the weighted average). I tried using embedded data fields within Survey Flow by using piped text to pull the recode values of each selected choice, and then using math operations to determine the maximum and apply weighting. The formula is however not working for me. Not sure if this is the best approach/right approach/i have something wrong with the formula/if this is even something that can be done within Qualtrics?   

Providing an example of one of the formulas I tried to enter in an embedded data field:

$e{max (${q://QID27/SelectedChoicesRecode}) * 30}

Hi ​@Franniem ,

The “max” function is not a valid mathematical operation in Qualtrics, which is why it's not working.
You should use conditional logic to determine the maximum value and then perform the necessary mathematical calculation for weighing.

Hope this resolves your query😊!!


Thank you for the reply! I tried the below, which is also not working. Wondering if IF and CONCAT are also not supported, and if not, then what is?

$e{ ( if( contains( concat( ",", ${q://QID27/SelectedChoicesRecode}, "," ), ",4," ), 4, if( contains( concat( ",", ${q://QID27/SelectedChoicesRecode}, "," ), ",3," ), 3, if( contains( concat( ",", ${q://QID27/SelectedChoicesRecode}, "," ), ",2," ), 2, if( contains( concat( ",", ${q://QID27/SelectedChoicesRecode}, "," ), ",1," ), 1, 0 ) ) ) ) ) * 30 }


Hi ​@Franniem ,

Yes, that also does not work in the survey flow. If you are well-versed in JavaScript, you can implement that using the above inside question. 

Otherwise, what I meant by conditional logic was survey flow logic. Please refer to the screenshot below.
 


Or
​​​​​​​


Hope this resolves your query😊!!