Round of Score | XM Community
Skip to main content
Solved

Round of Score

  • March 20, 2018
  • 3 replies
  • 108 views

Samarth
Level 2 ●●
Forum|alt.badge.img+5
Hi All, I am trying to round of respondent score using math operations and storing it in embedded data. However export is returning invalid expression. I have tried couple of things can someone direct me to the error in below math operations : 1. $e{round(gr://SC_06314PNp2z23wah/Score)} 2. $e{round(gr://SC_06314PNp2z23wah/Score,0)} Regards, Samarth

Best answer by uhrxx005

If you haven't already, I would take a look here: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/piped-text/math-operations/ Qualtrics requires that you include a space between every item in the equation. That may be why it isn't working. You also need to check the HTML source and make sure its not converting spaces to some weird characters Here is a formula I recently made and set up to round to 0 decimal places. $e{ round ( q://QID37/ChoiceTextEntryValue * .05 , 0 ) }

3 replies

TomG
Level 8 ●●●●●●●●
Forum|alt.badge.img+27
  • Level 8 ●●●●●●●●
  • 6084 replies
  • March 20, 2018
Just a guess, but I would try piping the score into an embedded variable first then rounding the embedded variable: ``` roundScore = ${gr://SC_06314PNp2z23wah/Score} roundScore = $e{ round( e://Field/roundScore , 0 ) } ```

Forum|alt.badge.img+5
  • Level 3 ●●●
  • 204 replies
  • Answer
  • March 20, 2018
If you haven't already, I would take a look here: https://www.qualtrics.com/support/survey-platform/survey-module/editing-questions/piped-text/math-operations/ Qualtrics requires that you include a space between every item in the equation. That may be why it isn't working. You also need to check the HTML source and make sure its not converting spaces to some weird characters Here is a formula I recently made and set up to round to 0 decimal places. $e{ round ( q://QID37/ChoiceTextEntryValue * .05 , 0 ) }

Samarth
Level 2 ●●
Forum|alt.badge.img+5
  • Author
  • Level 2 ●●
  • 54 replies
  • March 21, 2018
Hi Guys, Many thanks for the help! @TomG it worked however I have used approach suggested by @uhrxx005 since it lets me do have just one variable instead of creating two. @uhrxx005 many thanks for the tip 😀 Regards, Samarth