Category Archives: Rule Functions
Use, syntax and example of the DType function in TM1 and Planning Analytics. In this post we explain the use of the DType function and give an example of how it can be used to determine the cell type of a cube when loading data via a Turbo Integrator process.
The MONTH function in TM1 allows us to extract the number representing the Month from a date. Here we explain it’s syntax and give an example combining it with the DATE function.
The Date Function in TM1 converts a serial date from a number to a string. For example Date(13947 , 1); will return the string ‘1998-03-09’.
Explanation and Example of “AND” and “OR” Operators in IF statements in TM1 Rules.
Skipcheck in TM1 forces the TM1 engine to “skip the checking” of empty cells in a cube. So if you had 30 days in a month and data in only 9 of them, only 9 cells would be aggregated to get the total for the month. With the the skipping of blank cells disabled, all 30 cells would be checked to get the month total – three times more inefficient. … Continue Reading
I was asked the other day how to concatenate some information in TM1. Joining two text fields is really easy! Just use the pipe ( ” | ” ) between two variables and they will joined into one. There is nothing like the Excel Concatenate function in TM1. How to Concatenate Let’s say you have variable 1, sVariable1 = ‘Exploring’; and sVariable2 = ‘TM1’; then using sOutput = sVariable1 | sVariable2; will … Continue Reading
TODAY simply returns the current system date as a string in the form ‘yy-mm-dd’, or if you want, in the format ‘yyyy-mm-dd’. Syntax of TODAY The syntax is Today ( FourDigitYearFlag); where: FourDigitYearFlag – can be either omitted or 0 or 1, where omitted or 0 will return the 2 digit year and a 1 will return a 4 digit year. Example Assuming the current system date is 07 June … Continue Reading
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 … Continue Reading
Yesterday I was doing some work on an inventory forecasting system. I had Year, Month and Day dimensions and needed to bring through Actuals for all days up until yesterday. I have a System Settings cube with Current Day defined in it using a rule. To bring through the Actuals I created a rule that uses the DayNo function. !Year Syntax of DayNo DAYNO(‘DateString’) So here if you insert a string … Continue Reading
IF() is a function that can be used to test if an expression is true so that you can then differentially execute a rule based on the outcome of the IF statement. It is able to be used in both Turbo Integrator processes and Rules, however this post is about the use of it in Rules only. For TI based IF statements, please see this post. Syntax of IF() in Rules The syntax … Continue Reading