Advice on simple rule please...

Post Reply
Christian
Posts: 46
Joined: Wed Nov 18, 2009 8:43 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003

Advice on simple rule please...

Post by Christian »

Hi Everyone,

I'm befuddled by an error on what I would consider a pretty simple rule. This is only part of the rule, but I've written it separately to ensure this is the problem and it appears to be.

['Service Charge % Used] = IF (['Service Charge Criteria'] @= 'Consultant'), .25, STET;

'Service Charge Criteria' is a string element.

The error I'm getting is "Syntax error on or before: ['Service Charg logical expression

??

Any help would be greatly appreciated.

Thanks,
Christian
kitforshee
Posts: 6
Joined: Tue Sep 29, 2009 3:02 pm
OLAP Product: IBM Cognos TM1
Version: TM1 10.2
Excel Version: Office 365

Re: Advice on simple rule please...

Post by kitforshee »

Could it be that you are missing an apostrophe after the word, "Used" in the element name?
---------------------------V
['Service Charge % Used] = IF (['Service Charge Criteria'] @= 'Consultant'), .25, STET;

---------------------------V
['Service Charge % Used'] = IF (['Service Charge Criteria'] @= 'Consultant'), .25, STET;
kpk
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: Advice on simple rule please...

Post by kpk »

1. Use ['Service Charge % Used'] instead of ['Service Charge % Used]. You missed out the ' from the end of the target area.
2. Use IF (['Service Charge Criteria'] @= 'Consultant', .25, STET); You placed the ) to wrong place.

As is: ['Service Charge % Used] = IF (['Service Charge Criteria'] @= 'Consultant'), .25, STET;
Should be: ['Service Charge % Used'] = IF (['Service Charge Criteria'] @= 'Consultant', .25, STET);

Regards,

Peter
Best Regards,
Peter
Christian
Posts: 46
Joined: Wed Nov 18, 2009 8:43 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003

Re: Advice on simple rule please...

Post by Christian »

I actually have that apostrophe in my rule (it's a typo in my original post, sorry).

thanks for the quick feedback though.
User avatar
Mike Cowie
Site Admin
Posts: 483
Joined: Sun May 11, 2008 7:07 pm
OLAP Product: IBM TM1/PA, SSAS, and more
Version: Anything thru 11.x
Excel Version: 2003 - Office 365
Location: Alabama, USA
Contact:

Re: Advice on simple rule please...

Post by Mike Cowie »

Christian wrote:I actually have that apostrophe in my rule (it's a typo in my original post, sorry).

thanks for the quick feedback though.
Hi Christian,

Any reference to string data in a cube cannot use the internal [] cube reference. You need to use a DB function instead for string data like Service Charge Criteria. Very confusing, I know, but to TM1 the [] references are always assumed to return a number in Rules.

Regards,
Mike
Mike Cowie
QueBIT Consulting, LLC

Are you lost without Print Reports in Planning Analytics for Excel (PAfE)? Get it back today, for free, with Print Reports for IBM Planning Analytics for Excel!
Christian
Posts: 46
Joined: Wed Nov 18, 2009 8:43 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003

Re: Advice on simple rule please...

Post by Christian »

kpk wrote:1. Use ['Service Charge % Used'] instead of ['Service Charge % Used]. You missed out the ' from the end of the target area.
2. Use IF (['Service Charge Criteria'] @= 'Consultant', .25, STET); You placed the ) to wrong place.

As is: ['Service Charge % Used] = IF (['Service Charge Criteria'] @= 'Consultant'), .25, STET;
Should be: ['Service Charge % Used'] = IF (['Service Charge Criteria'] @= 'Consultant', .25, STET);

Regards,

Peter

Thanks Peter. This is the actual copy and paste from the rules editor (I'm working on another PC, so that's why I didn't copy and paste initially).

['Bank Service Charge % Used' ] = IF (['Bank Service Charges Criteria' ] @= 'Consultant',.25,STET);

I'm still getting the same error. The only thing I can think of that could be the fly in the ointment is that 'Consultant' is a string field that is imported from another cube that uses a picklist for criteria selection; Consultant, Headcount, Payroll, Collections, etc. I'm having serious problems writing conditionals off of a result from a picklist. Thanks again.
Christian
Posts: 46
Joined: Wed Nov 18, 2009 8:43 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003

Re: Advice on simple rule please...

Post by Christian »

Mike Cowie wrote:
Christian wrote:I actually have that apostrophe in my rule (it's a typo in my original post, sorry).

thanks for the quick feedback though.
Hi Christian,

Any reference to string data in a cube cannot use the internal [] cube reference. You need to use a DB function instead for string data like Service Charge Criteria. Very confusing, I know, but to TM1 the [] references are always assumed to return a number in Rules.

Regards,
Mike
Thanks Mike...let me give that a shot.
Christian
Posts: 46
Joined: Wed Nov 18, 2009 8:43 pm
OLAP Product: TM1
Version: 9.4
Excel Version: 2003

Re: Advice on simple rule please...

Post by Christian »

Mike...that fixed it!!!

Thanks everyone for the quick responses, you're life savers. :D
Post Reply