I'd like to ask if it possible to use String as output of a conditional statement for a String element?
Cause I tried writing for example:
['Message']= IF (['% Increase']<> 0 & ['Increase in Value']<>0, 'Just Enter 1 value','Okay');
Any editting I do, I can't seem to get it right.
String as Result of Conditional Statements
-
- Regular Participant
- Posts: 269
- Joined: Tue Apr 21, 2009 3:43 am
- OLAP Product: Cognos TM1, Planning
- Version: 9.1 SP3 9.4 MR1 FP1 9.5
- Excel Version: 2003
-
- MVP
- Posts: 214
- Joined: Tue Nov 11, 2008 11:57 pm
- OLAP Product: TM1, CX
- Version: TM1 7x 8x 9x 10x CX 9.5 10.1
- Excel Version: XP 2003 2007 2010
- Location: Hungary
Re: String as Result of Conditional Statements
Try it with "S:"
['Message']=S: IF (['% Increase']<> 0 & ['Increase in Value']<>0, 'Just Enter 1 value','Okay');
Regards,
Peter
['Message']=S: IF (['% Increase']<> 0 & ['Increase in Value']<>0, 'Just Enter 1 value','Okay');
Regards,
Peter
Best Regards,
Peter
Peter
- paulsimon
- MVP
- Posts: 808
- Joined: Sat Sep 03, 2011 11:10 pm
- OLAP Product: TM1
- Version: PA 2.0.5
- Excel Version: 2016
- Contact:
Re: String as Result of Conditional Statements
Hi
The S: is part of the solution. The other limitation with String Rules is that you cannot use the [ ] notation on the right hand side. You need to use the DB( ) notation, even though you are referencing the same cube.
Regards
Paul Simon
The S: is part of the solution. The other limitation with String Rules is that you cannot use the [ ] notation on the right hand side. You need to use the DB( ) notation, even though you are referencing the same cube.
Regards
Paul Simon
- paulsimon
- MVP
- Posts: 808
- Joined: Sat Sep 03, 2011 11:10 pm
- OLAP Product: TM1
- Version: PA 2.0.5
- Excel Version: 2016
- Contact:
Re: String as Result of Conditional Statements
Hi
Sorry - I didn't notice that the elements that you are referencing are numerics so you should be OK with the [ ].
Regards
Paul Simon
Sorry - I didn't notice that the elements that you are referencing are numerics so you should be OK with the [ ].
Regards
Paul Simon
-
- Regular Participant
- Posts: 269
- Joined: Tue Apr 21, 2009 3:43 am
- OLAP Product: Cognos TM1, Planning
- Version: 9.1 SP3 9.4 MR1 FP1 9.5
- Excel Version: 2003
Re: String as Result of Conditional Statements
I tried it but I'm getting the error Syntax error on r before 'Just Enter 1 value','Okay'); incorrect logical function
-
- MVP
- Posts: 214
- Joined: Tue Nov 11, 2008 11:57 pm
- OLAP Product: TM1, CX
- Version: TM1 7x 8x 9x 10x CX 9.5 10.1
- Excel Version: XP 2003 2007 2010
- Location: Hungary
Re: String as Result of Conditional Statements
3 ideas to check:appleglaze28 wrote:I tried it but I'm getting the error Syntax error on r before 'Just Enter 1 value','Okay'); incorrect logical function
1. Are you sure that the ['Message'] element is a part of your last dimension in the cube?
2. Are you sure that the ['Message'] element is defined as "S" type?
3. Try to use more parenthesis to make it work
['Message']=S: IF (((['% Increase']<> 0) & (['Increase in Value']<>0)), 'Just Enter 1 value','Okay');
Best Regards,
Peter
Peter
-
- MVP
- Posts: 214
- Joined: Tue Nov 11, 2008 11:57 pm
- OLAP Product: TM1, CX
- Version: TM1 7x 8x 9x 10x CX 9.5 10.1
- Excel Version: XP 2003 2007 2010
- Location: Hungary
Re: String as Result of Conditional Statements
You can also try
['Message']=S: IF (['% Increase']*['Increase in Value']<>0, 'Just Enter 1 value','Okay');
['Message']=S: IF (['% Increase']*['Increase in Value']<>0, 'Just Enter 1 value','Okay');
Best Regards,
Peter
Peter