You are viewing the documentation for Blueriq 17. Documentation for other versions is available in our documentation directory.
ROUND TO MULTIPLE
ROUNDSIG
ROUNDSIGUP
ROUNDSIGDOWN
The ROUND TO MULTIPLE function rounds a number value to a specified multiple.
Syntax
ROUND number [UP | DOWN] TO MULTIPLE multiple
number - Number or attribute of some type of number to be rounded.
UP or DOWN - The direction of rounding. The direction DOWN points to zero for both positive and negative values, UP points away from zero. If no direction is specified, rounding will be done to the nearest multiple (half-way values will be rounded up).
multiple - The multiple to be rounded to. This can be both a positive and negative value of any number type.
Return types
number
integer
currency
percentage
Examples
Expression | Alternative syntax | Result | Type |
---|---|---|---|
ROUND 12345.23 TO MULTIPLE 500 | ROUNDSIG( 12345.23, 500 ) | 12500.0000 | Number |
ROUND 12345.23 TO MULTIPLE 5 | ROUNDSIG( 12345.23 , 5 ) | 12345.0000 | Number |
ROUND 12345.23 TO MULTIPLE 0.50 | ROUNDSIG( 12345.23 , 0.50 ) | 12345.0000 | Number |
ROUND 12345.27 TO MULTIPLE 0.50 | ROUNDSIG( 12345.27 , 0.5 ) | 12345.5000 | Number |
If you prefer a more functional syntax, you can use the ROUNDSIG, ROUNDSIGDOWN or ROUNSIGUP functions, all with 2 number parameters.