Adding up to randomly generated numbers in a question | XM Community
Skip to main content

Hi, here's an example of what I'm trying to do:
At age ${rand://int/17:20} Mr. XXXX XXX-XXXX met Ms. YYYYYY YYYY. They were married for ${rand://int/30:40} years. He is now *1st number + 2nd number*
How do I create the 3rd number to be the product of the 2 previous numbers? thanks!!!

Please see this: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/piped-text/math-operations/


One way to do this would be to assign the random numbers to embedded variables in the survey flow in advance (e.g.,

age = ${rand://int/17:20}
), pipe them into your question text (e.g.,
${e://Field/age}
) and use a math operation to add them together (e.g.,
$e{ e://Field/age + e://Field/married }
).


Leave a Reply