Concatenation in Rules

Concatenation in Rules

Postby anoops81 » Mon Jun 27, 2011 10:38 am

Hi All ,

I wanted to know whether it is possible to concatenate string elements in rules statement.

I wanted to implement a measure element which evaluates to

Code: Select all
['Low Index']=['Material']|STR([' Index']);


Here Low Index , Material are string elements and Index is numeric .

I encountered an error "Syntax error on or before STR(['Index']); Missing semicolon

Any other suggestions to implement this will be helpful .

Regards
Anoop
anoops81
 
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010

Re: Concatenation in Rules

Postby Steve Rowe » Mon Jun 27, 2011 10:54 am

Hi, when referencing strings in rules you need to use the full DB( ....) expression.
You also need the S qualifier
Also I'm not sure that you don't have all the arguments of the STR function in place, it's actually like this STR(number, length, decimal)

['Low Index']= S: DB ('cube' , etc, 'Material') | trim( STR([' Index'], 10 ,0)));

Should give you something like you are after.

Cheers
User avatar
Steve Rowe
Site Admin
 
Posts: 1264
Joined: Wed May 14, 2008 4:25 pm
OLAP Product: TM1
Version: 9.0 9.1 9.5
Excel Version: Nearly all of them

Re: Concatenation in Rules

Postby anoops81 » Mon Jun 27, 2011 12:25 pm

Hi Steve ,

Thanks So much . It is working fine .
anoops81
 
Posts: 101
Joined: Tue May 12, 2009 8:20 am
OLAP Product: TM1
Version: 9.5.2
Excel Version: Office 2010


Return to Cognos TM1

Who is online

Users browsing this forum: Bing [Bot], Google [Bot] and 3 guests

Loading