Probably a stupid feeder question

Post Reply
rcoppa
Posts: 12
Joined: Thu Feb 19, 2009 9:50 pm
Version: 9.0SR3
Excel Version: 2007

Probably a stupid feeder question

Post by rcoppa »

Hi there,

I have created a rule that feeds and works as I expect:

Code: Select all

SKIPCHECK;
['Op Sup Ratio'] =  ['Total Operator'] / ['Total Support'];
FEEDERS;
['Total Operator'] =>['Op Sup Ratio'];
['Total Support'] =>['Op Sup Ratio'];
However when I add an if statement the consolidated values are no longer shown! N level is fine. This seems bizarre to me but im sure its something simple I'm missing.

Code: Select all

SKIPCHECK;
['Op Sup Ratio'] = if ( ['Total Support'] = 0 , 0 , ['Total Operator'] / ['Total Support']);
FEEDERS;
['Total Operator'] =>['Op Sup Ratio'];
['Total Support'] =>['Op Sup Ratio'];
Thanks in advance
kangkc
Community Contributor
Posts: 206
Joined: Fri Oct 17, 2008 2:40 am
OLAP Product: TM1, PA , TMVGate
Version: 2.x
Excel Version: 36x
Location: Singapore
Contact:

Re: Probably a stupid feeder question

Post by kangkc »

You don't need to use "IF" looking at your logic, just use the "\" instead of "/"

TM1 rule will handle it well. See the rule guide:

\ (back slash) - Same as / (forward slash), but returns zero when you divide by zero, rather than an undefined value.
rcoppa
Posts: 12
Joined: Thu Feb 19, 2009 9:50 pm
Version: 9.0SR3
Excel Version: 2007

Re: Probably a stupid feeder question

Post by rcoppa »

Thankyou.

Using \ I still have no values appear in a consolidated view. If i use '/' the values appear correctly but i get some undefined (correct behaviour).
par3
Posts: 82
Joined: Tue Sep 09, 2008 7:05 am

Re: Probably a stupid feeder question

Post by par3 »

That is the point of using the "\". If your value can't be calculated (N/A) it returs a 0. That is probably what is happening at your consolidated level.
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Probably a stupid feeder question

Post by David Usherwood »

Also, don't feed from both sides of your ratio. Normally I feed from the denominator on the basis that if you have zero, you won't get a meaningful result. So.
SKIPCHECK;
['Op Sup Ratio'] = ['Total Operator'] \ ['Total Support'];
FEEDERS;
['Total Support'] =>['Op Sup Ratio'];

Strictly, since your calculation is at all levels, you don't need to feed it at all. If you slice to Excel you will get good numbers. But I admit that this makes life difficult for zero suppressed views so yes, I normally feed ratios like this.
Post Reply