Decimals | XM Community
Skip to main content
Question

Decimals

  • November 24, 2020
  • 2 replies
  • 44 views

Hi!

When creating a weighted mean score with piped text after a question, I got way too many decimals (3.999992939393939). That why I wanted to create a weighted mean with a maximum of 2 decimals. I read on one of these forums that you should use: $e{round(gr://SC_4OvT2vAMl4JC6ah/WeightedMean, 2 )}
So, thats what I did. Unfortunately, when I preview my survey this expression is invalid. I tried several things, with putting white spaces for instance.
Someone who can help with this?

Thanks !

2 replies

PraDeepKotian_XM
QPN Level 5 ●●●●●
Forum|alt.badge.img+21
  • QPN Level 5 ●●●●●
  • November 24, 2020

Hi JosVerheul
Try this $e{ round( gr://SC_4OvT2vAMl4JC6ah/WeightedMean, 2 ) }. Adding space between the each item worked for me. if you still facing the issue of invalid expression then you can take the text in notepad to remove some additional characters in between.


  • Author
  • November 24, 2020

Thanks for your reply! Unfortunately it's still not working and I get {Invalid Expression}  again ..