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

How to find 2nd (and 3rd) highest score in a constant sum?

  • February 14, 2025
  • 3 replies
  • 35 views

Forum|alt.badge.img+2

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. 

3 replies

  • Level 4 ●●●●
  • 208 replies
  • February 17, 2025

could you be more specific


Forum|alt.badge.img+2
  • Author
  • Level 2 ●●
  • 7 replies
  • February 17, 2025
jbk wrote:

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. 


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 5926 replies
  • February 17, 2025

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