STR TM1 Function: Syntax and Use

STR is a TM1 function that converts a number to string.

It is very similar to the Excel function “TEXT”, except you don’t need to specify the format of the output.

If you are looking for the command to convert a string into a number, please see the Numbr function.

Syntax of STR

STR (number, length, decimal); where:

  • number – the actual number you want to convert,
  • length – the length of the string output, with padded blank spaces if your number is shorter than the value entered here,
  • decimal – how many decimal places to take the new string to.


vNumber = 166.359

STR ( vNumber , 6 , 1 );

Will return ‘ 166.4’, i.e. six characters long with a leading space.

This function can be used in both TM1 Rules and TurboIntegrator processes. It is also very similar to the NumberToString function, however that can only be used in TI Processes.

If you like this post, please spread the love…

About John

Managing Director of Infocube. We are a management accounting consultancy that specialises in Business Analytics.
This entry was posted in Rule Functions, TI Functions. Bookmark the permalink.