Page 1 of 1

Feeders help

Posted: Wed Nov 20, 2013 1:38 pm
by KazĂȘh
hello guys, im trying to write a feeder for a rule with the following structure:


(CubeC)
['C'] = (DB('CubeA','dim1','dim2','dim3', 'A')* DB('CubeB', 'Dim1','Dim2','Dim3', 'B'))/ DB( 'CubeA','dim1','dim2','dim3','A16');

what i tryed so far was this:

In CubeA:

A=> DB('CubeC', dim1, dim2, dim3,'C');

in CubeB:

B=> DB('CubeC', dim1, dim2,dim3,'C');


and i was wondering how should i add the feeder for the variable 'A16', im not very good at feeders , i have no problems with only just multiplications, but when it has divisions and multiplications and others stuffs i get dizzy.

right now im reading this

http://www.ibm.com/developerworks/ssa/d ... ge620.html
and there is an example for division feeder

['A/B']=n:['A']/['B'];
['A']=>['A/B'];

but in this case C = ((A*B)/A16)

should i do something like this?

A=> C
B=> C
A16=> C

thanks for any tips

Re: Feeders help

Posted: Wed Nov 20, 2013 2:33 pm
by tomok
You need to step back and think about why a feeder is necessary. It's necessary when the result of a calculation is going to result in a non-zero value correct? In your example, if any of the components of the calculation are zero then the end result is going to be zero. If the value from Cube A is zero then it doesn't matter what comes from B. Likewise for the B to A cube relationship. So, feeding from both A and B is going to result in overfeeding. The only way to fix this is with conditional feeding. However, this is probably overkill, depending on your situation. If it were me, I would just feed from either A or B, not both.

If your calculation was adding A to B then you would need to feed from both, but since this is a division, you need to only pick one to feed from.