Decimals | Experience Community
Skip to main content
Question

Decimals

  • Nov 24, 2020 11:11 AM UTC
  • 2 replies
  • 64 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 ●●●●●
  • Nov 24, 2020 11:27 AM UTC

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
  • Nov 24, 2020 5:56 PM UTC

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