Calculate scores based on survey questions and assign highest score | XM Community
Solved

Calculate scores based on survey questions and assign highest score

  • 27 April 2020
  • 5 replies
  • 577 views

Hi - I'm trying to automate some segmentation work that gets done based on survey questions. Basically, I have a number of segments, and the score for each one is calculated by multiplying the responses to specific questions by different values. Then, whichever segment has the highest score is the segment that the user is assigned to.
I found this question that was previously asked that's quite similar, bu I'm not sure how to set up the calculations - would this be a formula variable or is there any way to set the calculation up before any responses are recorded?
Identify the variable with the maximum valueAlso curious if anyone might know how to do this in Javascript.
Thanks!

icon

Best answer by ana_velez 8 June 2020, 18:54

View original

5 replies

Userlevel 7
Badge +22

We use Math operation in this scenario. Assuming all your questions included in calculation are force response you can use selected choice code in the formula. Once all the segment value is calculated use the method mentioned in the post you have mentioned in the question.
Also, similarly we can also use JS in this scenario, like capturing all selected choice code in variable and then doing calculations on it. The results are stored in embedded data.

Userlevel 6
Badge +27

Hi!!

i have done this with math operations in the embedded data, with this i assign a result for each of the segments. and then i create multiple branches to give a value to the final segment.

The branch would say: if segment 1 is greater than the piped text for sgement 2

final segment= segment 1

https://www.qualtrics.com/community/discussion/comment/24671#Comment_24671rondev Any chance you could walk me through the JS for this? I'm very new to this and not quite sure how to do it.
Unfortunately they're not all force response, but if one particular field is missing, I'd just want the segment to be NA.
Thank you both for your responses!

https://www.qualtrics.com/community/discussion/comment/24809#Comment_24809Hi again ana_velez_voce - I've assigned each of my segments, and now I'm struggling a bit with the second part. Are you able to compare two objects like that? When I select if segment1 is greater than, the comparison it gives me has to be typed in - not sure how to compare it to another object

Userlevel 6
Badge +27

https://www.qualtrics.com/community/discussion/comment/26383#Comment_26383Hi! I believe you can do that using the piped text for the second option!

Leave a Reply