Page 1 of 1

Imputed elements in RHS of Feeder

Posted: Mon Jul 30, 2012 7:47 am
by iansdigby
Apologies if this has already appeared somewhere and my searching failed to find it.
I understand that when writing a rule, elements on the RHS of the rule are imputed from the LHS.

For example, there is no need to write:
['Profit','UK']= N:['Sales','UK']-['Expenditure','UK'];

because 'UK' is inferred on the RHS, so the following will do:
['Profit','UK']= N:['Sales']-['Expenditure'];

My question is whether this is also true of feeders. Do you need to itemise all the elements on the RHS of a feeder? Taking the above example, would it be correct to write:

['Sales','UK']=> [Profit];
['Expenditure','UK']=> [Profit];

Many many thanks to those who selflessly give their time to answer these (sometimes I am sure daft) questions.

Re: Imputed elements in RHS of Feeder

Posted: Mon Jul 30, 2012 8:33 am
by lotsaram
How area statements are applied in rules vs feeders is a little different but in your example I think it would be true to say that the same principle applies, namely you don't need to specify an element reference on the RHS unless you specifically want to redirect to a DIFFERENT element as the region defined on the LHS limits the RHS to evaluating only that area and will therefore match 1:1.

I am assuming that UK is an N level element therefore this would hold true.

However where rules and feeders are different in how area statements are interpreted is that rules are point specific to the given intersection of elements on the LHS and can apply at any dimension level. But feeders are different in that they deal with data (or pseudo-data) and data by definition is held at leaf level only. Therefore if a consolidated element is referenced on the LHS of a feeder this is effectively shorthand for an array reference listing all ultimate N level descendants under the named consolidation. Same goes for the RHS. Therefore to take your example if "UK" was not a leaf in a country dimension but rather a consolidation in a county dimension then if UK was listed on the LHS what would be evaluated on the RHS would actually be Avon,Bedfordshire,Berkshire,Bristol, ...,Yorkshire. This fact about feeders ultimately does everyone in at some point in time, especially around cross-cube feeders where dimensionality is slightly different. I am pretty sure it doesn't apply in your case but something to be aware of.

Re: Imputed elements in RHS of Feeder

Posted: Mon Jul 30, 2012 8:54 am
by iansdigby
lotsaram (indeed the computer in your brain has),

Many thanks for this illuminating contribution. Indeed we have already been "done in" on the feeder scenario you describe, i.e. referencing consolidated elements in mismatched cubes. Watching live the consumption of RAM increasing rapidly and inexorably with an out-of-control feeder, being unable to do anything about it except pray that it won't crash the server, is a bit like watching the Olympics in reverse.