Rules in test cube not consolidating in production cube
Posted: Thu Jun 03, 2010 9:52 pm
We have a KPI that has to be weighted both by ownership & time -- both intra- & inter-month. In excel, it's relatively straightforward to calculate using sumproduct, but without that at our disposal we decided we'd better test the calc it in it's own cube. BUT...after getting it worked out, the code didn't translate into the 'production cube' (ie. the one where we'd like to have them reside) successfully. The denominator in the weighted average doesn't calculate and the c-level element is consolidated, per usual, instead of following the prescribed formula.
And based on other things we've read here (we're relatively new to TM1), it doesn't appear we can just pluck the consolidated numbers from the test cube, and plug them into the corresponding consolidated points in the production cube. So we're a bit stymied, and figured we'd turn here for advice.
Simplifying the element names, here's the code:
[flag] , [share] , [days operating] are all brought in from a different cube
All feed and consolidate as expected.
[weight] = N: [kpi 1] * [share] * [flag];
[numerator] = N: [kpi 2] * [weight] * [days operating];
These calc & consolidate as expected.
[denominator] = C: [weight] * [days operating] / [flag];
Works perfectly in the test cube, both for the company for each month & for all entities for YTD.
Returns zero in the production cube. (?!?)
(Note: Done at C-level, b/c we need SUM(X) * SUM(Y) / SUM(Z), not SUM( X * Y / Z ).)
[kpi 2] = C: [numerator] / [denominator];
Again, works perfectly in the test cube, both for the company for each month & all entities for YTD.
In the production cube, it just consolidates all the percentages instead of performing the calculation.
Even when we drop the C: from the denominator equation, to enable it to divide by a non-zero number (albeit a wrong one), it still does the regular consolidation.
Feeders, as follows:
[kpi 1]=>[weight];
[kpi 2]=>[numerator];
[weight]=>[denominator];
[numerator]=>[kpi 2];
And based on other things we've read here (we're relatively new to TM1), it doesn't appear we can just pluck the consolidated numbers from the test cube, and plug them into the corresponding consolidated points in the production cube. So we're a bit stymied, and figured we'd turn here for advice.
Simplifying the element names, here's the code:
[flag] , [share] , [days operating] are all brought in from a different cube
All feed and consolidate as expected.
[weight] = N: [kpi 1] * [share] * [flag];
[numerator] = N: [kpi 2] * [weight] * [days operating];
These calc & consolidate as expected.
[denominator] = C: [weight] * [days operating] / [flag];
Works perfectly in the test cube, both for the company for each month & for all entities for YTD.
Returns zero in the production cube. (?!?)
(Note: Done at C-level, b/c we need SUM(X) * SUM(Y) / SUM(Z), not SUM( X * Y / Z ).)
[kpi 2] = C: [numerator] / [denominator];
Again, works perfectly in the test cube, both for the company for each month & all entities for YTD.
In the production cube, it just consolidates all the percentages instead of performing the calculation.
Even when we drop the C: from the denominator equation, to enable it to divide by a non-zero number (albeit a wrong one), it still does the regular consolidation.
Feeders, as follows:
[kpi 1]=>[weight];
[kpi 2]=>[numerator];
[weight]=>[denominator];
[numerator]=>[kpi 2];