Page 1 of 1

need help with nested syntax

Posted: Fri Sep 25, 2009 7:59 pm
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".

Re: need help with nested syntax

Posted: Fri Sep 25, 2009 8:05 pm
by mattgoff
Unless it's a posting/retype error, you're missing the @ before the = in your string compare.

Re: need help with nested syntax

Posted: Fri Sep 25, 2009 8:10 pm
by kbogies
thank you, thank you mattgoff! i'm still new at rule writing and always forget about the "@"....

Re: need help with nested syntax

Posted: Fri Sep 25, 2009 10:40 pm
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.