Page 1 of 1
Assign Constant value in Rule , Feeder problem
Posted: Sat Oct 13, 2012 12:43 pm
by hyunjia
Hi All
I need to assign a constant in a rule , and I get the constant value from a lookup cube of 2 dimension , which got only 1 element for these 2 dimensions, a in A dimension and b in B dimension.
So I wrote this rule "['Actual'] = N: DB('constant', 'a', 'b') ;" , Say my original cube is called "Test" , How am I going to feed the rule ?
I try this one but faild "['a','b' ]=>DB('Test', 'Actual' !location, !model,!account1 ,!month );" , please shed some light and guide me through this .

Re: Assign Constant value in Rule , Feeder problem
Posted: Sat Oct 13, 2012 4:57 pm
by tomok
What purpose does it serve to populate a cube with constants and why exactly do you feed the need to feed? You don't have to feed a rule-based assignment like this, especially if it is just being used as an intermediate number to calculate something else.
Re: Assign Constant value in Rule , Feeder problem
Posted: Sat Oct 13, 2012 11:41 pm
by hyunjia
Actually, I am building a mechanism of audit trail , while using rule to calculate the apportion process and TI to do the same thing but populate to a set of audit cube.
The constant need to be retrieve by view in a TI process.
tomok wrote:What purpose does it serve to populate a cube with constants and why exactly do you feed the need to feed? You don't have to feed a rule-based assignment like this, especially if it is just being used as an intermediate number to calculate something else.
Re: Assign Constant value in Rule , Feeder problem
Posted: Sun Oct 14, 2012 9:39 am
by qml
hyunjia wrote:The constant need to be retrieve by view in a TI process.
In that case surely the TI can just take the constant from the original cube/cell once using a single CellGetN/CellGetS? There's absolutely no reason to spread your constant all over the place, feeding it on top of that, just so that it can be used in a TI process. That would be a very bad design.
Re: Assign Constant value in Rule , Feeder problem
Posted: Wed Oct 17, 2012 5:06 am
by Andy Key
Whilst I agree with tomok and qml that given the information you have given us you don't need to be doing this, you need to think about what the right hand side of your feeder statement is doing.
If the rule in your 'Test' cube is
Code: Select all
['Actual'] = N: DB('constant', 'a', 'b') ;
And if the only thing you can feed 'Actual' from is the ['a', 'b'] combination, then the feeder:
Code: Select all
['a','b' ]=>DB('Test', 'Actual' !location, !model,!account1 ,!month );
needs to be in your 'constant' cube, and in your 'constant' cube !location, !model, !account1 and !month have no meaning. You will need to replace these with explicit references to (probably consolidated) elements within those dimensions.