How do I use piped text to calculate a quiz results as a percentage? | XM Community
Skip to main content

I have found a few articles that talk about utilizing piped text (something I have little experience with at this point) to display the results of a quiz as a percentage versus the raw score. For example, I have a short 8 question quiz and the stakeholder wants to display to the user their percentage right out of the 8 total questions. I can't find what the equation needs to be in order to output the information properly. I found similar articles, but not quite what I needed. Thanks in advance!

Calculate/pipe it like this:
$e{ ( gr://SC_xxx/Score / 8 ) * 100 }


TomG Thanks Tom! I'm assuming this text is applied in the Survey Flow? Do I need to modify any values? Like I said, I have little experience with piped text. At this point all we have needed to do is basic surveys. Thanks again!


It could be pipe in the survey flow (to set an embedded data field), in a question, an end of survey message, etc.
You'll need to replace gr://SC_xxx/Score with the pipe for the actual scoring category (xxx will be a Qualtrics generated id for the scoring category).


TomG ok my piped text looks like this $e{ ( gr://SC_efJHppiotK5OkXY/Score / 8 ) * 100. In my Results, the area where it displays shows False Score and True Score, but no number data. I have the piped text set up as embedded data after the question blocks, but before the scoring conditions (sending them back to the beginning if they fail or a congratulations message if they pass). I am fine if the raw score displays for the user, but I want the percentage to display in the output for the stakeholder. What am I doing wrong? Again, I appreciate your help with this Tom!


Leave a Reply