COGNOiSe.com - The IBM Cognos Community

Planning & Consolidation => TM1 => Topic started by: Shaunysyd on 04 Nov 2009 07:13:51 PM

Title: Conditional String element comparisons
Post by: Shaunysyd on 04 Nov 2009 07:13:51 PM
I am trying to write a rule in TM1.
The calc is:
['Opportunity Probability'] = s:   
IF ( ['APPROVAL for Uniprom'] @<> '','Absolute',['<<<Opportunity Probability']);

All of the elements are strings. When I validate this I get the error "Syntax Error xxxx Logical expression"

Is it possible to compare string values? I think the issue is with the element @<> part.

Any help greatly received.
Title: Re: Conditional String element comparisons
Post by: MichelZ on 04 Nov 2009 11:58:21 PM
Hi,

For some reason the rules syntax checker is only accepting external (DB) area reference notation for string areas - so instead of ['APPROVAL for Uniprom'] you should write DB('yourcube', ..., 'APPROVAL for Uniprom'). This will also apply to the ['<<<Opportunity Probability'] reference.

Michel
Title: Re: Conditional String element comparisons
Post by: Shaunysyd on 05 Nov 2009 03:55:50 PM
Yep that works perfectly. Thanks very much.