Round of Score | XM Community
Solved

Round of Score

  • 20 March 2018
  • 3 replies
  • 62 views

Userlevel 4
Badge +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
icon

Best answer by uhrxx005 20 March 2018, 17:33

View original

3 replies

Userlevel 7
Badge +27
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 ) }
```
Userlevel 6
Badge +5
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 ) }
Userlevel 4
Badge +5
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

Leave a Reply