How to find 2nd (and 3rd) highest score in a constant sum? | XM Community
Skip to main content

Hello! 

 

I have a constant sum question with 18 variables. 

I need to pull the highest 3 variables. 

Qualtrics makes IDing the highest easy, but I have no idea how to ID #2 and #3. 

could you be more specific


could you be more specific

Sure, let me give you an example. 

Question type: constant sum.

Question: Beyond the hot dog and bun, how much of each ingredient goes on your hot dog? 

  • ketchup: 30
  • mustard: 25
  • relish: 10
  • chili: 10
  • cheese: 0
  • bacon bits: 20
  • non-nutritive cereal varnish: 5
  • TOTAL: 100%

I want to ask a follow up on the 3 highest ingredients. 

I know how to ask about ketchup, via embedded data--but IDK how to ask about mustard & bacon bits. 

Notes: this is NOT how I eat my hog dog. bonus if you can ID the easter egg. also, this was the easiest example i could come up with on the spot--the real question would mirror this. constant sum is a MUST. 


You’ll need to write JavaScript to sort the percentages and store the ranks in embedded data fields. It gets bit tricky because there could be ties. 

If you are interested, I have a function that does this.


Leave a Reply