Page 1 of 1

write feeders in rules using DB function

Posted: Tue Jul 27, 2010 12:49 pm
by sunitha
Hi,

I'm trying to write a rule,using two external (lookup) cubes to calculate the amount, please help me how to write the feeders for the following rule.

['amount']=N:DB('inve_Vol',!d_month,!d_year,!d_version,!inv_type,!inv_ca,'quantity') * DB('inv_rates',!d_month,!d_year,!d_version,'Unit Price');

when i try to trace the calculation and feeders in tm1 view the values are not fed and calculated.

regards,
Sunitha

Re: write feeders in rules using DB function

Posted: Tue Jul 27, 2010 4:11 pm
by kielmc
['amount']=N:DB('inve_Vol',!d_month,!d_year,!d_version,!inv_type,!inv_ca,'quantity') * DB('inv_rates',!d_month,!d_year,!d_version,'Unit Price');
Since this is simple multiplication, you can feed from either factor, using 'quantity' in the 'inve_Vol' cube or 'Unit Price' in the 'inv_rates' cube.

something like this:

#feeder in 'inv_Vol' cube
['quantity'] => DB('rule cube', dim1, dim2, ..., 'amount');

or

#feeder in 'inv_rates' cube
['Unit Price'] => DB('rule cube', dim1, dim2, ..., 'amount');

Re: write feeders in rules using DB function

Posted: Wed Jul 28, 2010 7:53 am
by Andy Key
...but as Quantity is more sparse than Price, use the feeder from the cube with Quantity to avoid overfeeding.