Hi,
I have a measure in which one element is string(Current status) which contains a single alphabet('G', 'R', 'Y') and i have a simple element(Status). I want to populate the numeric field such as if string element has 'G' then 1, 'Y' then 2 and 'R' then 3.
I wrote a rule like this.
['Status']=IF(['Current Status']='G', 1, IF(['Current Status']='Y', 2, IF(['Current Status']='R', 3, 0)));
Am am getting following error
---------------------------
TM1 Error
---------------------------
Line 1: Syntax error on or before:
'G', 1, IF(['Current
incorrect logical comparison
Please help me with this error.
Thanks
Daya
Error in rule
-
- Site Admin
- Posts: 6667
- Joined: Sun May 11, 2008 2:30 am
- OLAP Product: TM1
- Version: PA2.0.9.18 Classic NO PAW!
- Excel Version: 2013 and Office 365
- Location: Sydney, Australia
- Contact:
Re: Error in rule
Use @=, not =, to do a comparison against a string value.daya007 wrote:Hi,
I have a measure in which one element is string(Current status) which contains a single alphabet('G', 'R', 'Y') and i have a simple element(Status). I want to populate the numeric field such as if string element has 'G' then 1, 'Y' then 2 and 'R' then 3.
I wrote a rule like this.
['Status']=IF(['Current Status']='G', 1, IF(['Current Status']='Y', 2, IF(['Current Status']='R', 3, 0)));
Am am getting following error
---------------------------
TM1 Error
---------------------------
Line 1: Syntax error on or before:
'G', 1, IF(['Current
incorrect logical comparison
Please help me with this error.
Thanks
Daya
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
-
- Posts: 49
- Joined: Fri May 28, 2010 4:47 am
- OLAP Product: TM1
- Version: 9.5.1
- Excel Version: 2003
- Location: IL, USA
Re: Error in rule
Hi Alan
Thanks for the quick reply
I have tried
['Status']=IF(['Current Status']@='G', 1, IF(['Current Status']@='Y', 2, IF(['Current Status']@='R', 3, 0)));
still am getting following error.
Donno where i am missing.
---------------------------
TM1 Error
---------------------------
Line 1: Syntax error on or before:
['Current Status']@=
logical expression
Rule could not be attached to the cube, but changes were saved.
---------------------------
OK
---------------------------
Thanks for the quick reply
I have tried
['Status']=IF(['Current Status']@='G', 1, IF(['Current Status']@='Y', 2, IF(['Current Status']@='R', 3, 0)));
still am getting following error.
Donno where i am missing.
---------------------------
TM1 Error
---------------------------
Line 1: Syntax error on or before:
['Current Status']@=
logical expression
Rule could not be attached to the cube, but changes were saved.
---------------------------
OK
---------------------------
-
- Posts: 60
- Joined: Wed Aug 04, 2010 3:59 pm
- OLAP Product: TM1
- Version: 9.5.1
- Excel Version: 2007
Re: Error in rule
one thing to add that @and = should be together i.e. no space between them.
-
- Posts: 49
- Joined: Fri May 28, 2010 4:47 am
- OLAP Product: TM1
- Version: 9.5.1
- Excel Version: 2003
- Location: IL, USA
Re: Error in rule
Yes they are together but same error 

-
- Site Admin
- Posts: 1458
- Joined: Wed May 28, 2008 9:09 am
Re: Error in rule
You're referencing string content using the [...] syntax, which won't work. Write full DB() references instead.
-
- Posts: 49
- Joined: Fri May 28, 2010 4:47 am
- OLAP Product: TM1
- Version: 9.5.1
- Excel Version: 2003
- Location: IL, USA
Re: Error in rule
Thank you so much
it worked
it worked
