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

How do I use piped text to calculate a quiz results as a percentage?

  • April 19, 2022
  • 4 replies
  • 605 views

Forum|alt.badge.img+1

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!

4 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • April 20, 2022

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


Forum|alt.badge.img+1
  • Author
  • April 20, 2022

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!


TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • April 20, 2022

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).


Forum|alt.badge.img+1
  • Author
  • April 20, 2022

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!