Have an idea?

Visit Sawtooth Software Feedback to share your ideas on how we can improve our products.

Is it possible to put ROUNDTONUMBER around an equation?


I'm wondering if it's possible to put the ROUNDTONUMBER function around an equation rather than just a number?

For example:

I am using the following script to derive a number, which works nicely drawing pieces of information from early in the survey and generating a number for use in an ACBC. However the numbers it generates are often awkward in the sense that they aren't rounded.  Like 80,567. where I'd rather the respondent see 80,500 (rounding to the nearest 500) etc. is this possible?

[% (((WPSM5Price+WPSM6Price+WPSM7Price+WPSM8Price)/4)*.7)+ HowManyRoomsHouse%]

I haven't been able to make it work so far...

Any help would be greatly appreciated...
asked Jun 28, 2017 by Jasha Bowe Bronze (1,725 points)
retagged Jun 28, 2017 by Walter Williams

1 Answer

+1 vote
Best answer
The format for the function you refer to is:


Rounds NUMBER to the nearest ROUNDTO value, such as to the nearest 10, 25, 50, 100, 250, 500, 1000, 5000, 10000, etc.

In your example, I would use:
[%ROUNDTONUMBER((((WPSM5Price+WPSM6Price+WPSM7Price+WPSM8Price)/4)*.7)+ HowManyRoomsHouse,500)%]
answered Jun 28, 2017 by Paul Moon Platinum (101,255 points)
selected Jun 28, 2017 by Jasha Bowe
Genius! I was missing one parenthesis and had the comma in the wrong place... thanks so much once again!!