MicroStrategy ONE
Round2 (Round to Specified Precision)
Returns the input values rounded to a specified number of digits. This is a single-value function.
Syntax
Where:
Argument
is a metric representing a list of real numbers
Precision
is an integer value specifying the placement of the digits to which the Argument
value(s) are rounded.
- If
Precision
= 0, then the values are rounded to the nearest integer. This has the same results as using theRound
function. - If
Precision
is greater than 0, then the values are rounded to the decimal place indicated. - If
Precision
is less than 0, then the values are rounded to the specified digits to the left of the decimal and starting to the left of the integer in the ones place.
Example
This simple example illustrates how the Precision value affects the results of the Round2 function.
Argument values | Round2(argument, 0) | Round2(argument, 1) | Round2(argument, -1) |
947.67 |
948.00 |
947.70 |
950.00 |
811.00 |
811.00 |
811.00 |
810.00 |
463.33 |
463.00 |
463.30 |
460.00 |