Does STR round the value?

Product:
Planning Analytics 2.0.9.19
Microsoft Windows 2019 server

Issue:

Does the STR function round up the number before converting it to a string?

Solution:

Create a cube with this values:

Create a TM1 TI process with this code:

You will get this output when run:

Looks like the 5 or 6 fifth decimal is increasing the value in the result.

More Information:

https://exploringtm1.com/str-tm1-function-syntax-use/

https://exploringtm1.com/dimnm-tm1-function-use-syntax/

https://exploringtm1.com/dimsiz-tm1-function-use-and-syntax/

 

STR converts a number to a string.

This is a TM1® rules function, valid in both TM1 rules and TurboIntegrator processes.

The number passed to the STR function must use. (period) as the decimal separator and , (comma) as the thousand separator. Any other decimal/thousand separators will cause incorrect results.

Syntax

STR(number, length, decimal)

Argument

Description

number

The number being converted to a string.

length

The length of the string. If necessary, the function inserts leading blank spaces to attain this length.

decimal

The number of decimal places to include in the function result.