Round of Score | XM Community
Skip to main content
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
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 ) }

```
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 ) }
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