need help with nested syntax

Post Reply
kbogies
Posts: 31
Joined: Tue Jun 10, 2008 8:21 pm
OLAP Product: TM1
Version: 9.1sp4 64x
Excel Version: 2003
Location: Hartford, CT

need help with nested syntax

Post by kbogies »

hi all,
hope someone can point out what i'm doing wrong here... my eyes are melting :?

i tried breaking the formula down to it's simplist state of an IF statement, so don't mind the results of "1" if true, "2" if false...

Code: Select all

['Ultimate RPC Ratio'] = IF(DB('WP Actual Reporting', !BPF Strategy, !WPMetrics, 
ATTRS('BPF Product',!BPF Product, 'LOB'), !BPF Term, !WPChannel, !BPF State, 
!WPEvalPeriod, !WPEffectivePeriod) = 'Auto', 1, 2);
'WP Actual Reporting' is the name of the cube, with all the dimensions listed
['Ultimate RPC Ratio'] is an element of the WPMetrics dimension.
LOB is a text attribute of the BPF Product dimension, populated with results of: 'auto', 'property', or ' '.

i keep getting an error message for the bold section at the end, saying that it's "incorrect logical comparison".
User avatar
mattgoff
MVP
Posts: 516
Joined: Fri May 16, 2008 1:37 pm
OLAP Product: TM1
Version: 10.2.2.6
Excel Version: O365
Location: Florida, USA

Re: need help with nested syntax

Post by mattgoff »

Unless it's a posting/retype error, you're missing the @ before the = in your string compare.
Please read and follow the Request for Assistance Guidelines. It helps us answer your question and saves everyone a lot of time.
kbogies
Posts: 31
Joined: Tue Jun 10, 2008 8:21 pm
OLAP Product: TM1
Version: 9.1sp4 64x
Excel Version: 2003
Location: Hartford, CT

Re: need help with nested syntax

Post by kbogies »

thank you, thank you mattgoff! i'm still new at rule writing and always forget about the "@"....
David Usherwood
Site Admin
Posts: 1457
Joined: Wed May 28, 2008 9:09 am

Re: need help with nested syntax

Post by David Usherwood »

May I also offer the following layout suggestion:

Code: Select all

['Ultimate RPC Ratio'] = 
  IF(
  DB('WP Actual Reporting', !BPF Strategy, !WPMetrics,
  ATTRS('BPF Product',!BPF Product, 'LOB'), 
  !BPF Term, !WPChannel, !BPF State,!WPEvalPeriod, !WPEffectivePeriod) @= 'Auto', 
  1, 
#else
  2
  );
I'm currently working on converting a 31 tab excel workbook into a TM1 model and found that in one tab, the contents of _each cell_ filled a single page in Word - and of course it was unformatted.
Post Reply