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];
Rules in test cube not consolidating in production cube
-
- Posts: 5
- Joined: Mon May 03, 2010 6:11 pm
- OLAP Product: TM1
- Version: 9.4
- Excel Version: 2007
- Martin Ryan
- Site Admin
- Posts: 2003
- Joined: Sat May 10, 2008 9:08 am
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: Rules in test cube not consolidating in production cube
You need to set the AllowSeparateNandCRules=T in the cfg file.
I know, it's stupid.
Martin
I know, it's stupid.
Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Jodi Ryan Family Lawyer
-
- Posts: 5
- Joined: Mon May 03, 2010 6:11 pm
- OLAP Product: TM1
- Version: 9.4
- Excel Version: 2007
Re: Rules in test cube not consolidating in production cube
Found and changed the setting. Made no difference. Wasn't sold that it would, given that the test cube successfully handles the different N- & C- level formulae.
BTW, when you trace the calc, it indeed appears that it is looking to sum the subsidiaries as opposed to multiplying the 3 terms.
BTW, when you trace the calc, it indeed appears that it is looking to sum the subsidiaries as opposed to multiplying the 3 terms.
- Steve Rowe
- Site Admin
- Posts: 2464
- Joined: Wed May 14, 2008 4:25 pm
- OLAP Product: TM1
- Version: TM1 v6,v7,v8,v9,v10,v11+PAW
- Excel Version: Nearly all of them
Re: Rules in test cube not consolidating in production cube
Hi Font,
Suggest you post the exact rules if you can.
It's probably an order (of the rule list) issue so look very closely at any difference between your test cube and the real deal.
Suggest you post the exact rules if you can.
It's probably an order (of the rule list) issue so look very closely at any difference between your test cube and the real deal.
Technical Director
www.infocat.co.uk
www.infocat.co.uk
- Michel Zijlema
- Site Admin
- Posts: 713
- Joined: Wed May 14, 2008 5:22 am
- OLAP Product: TM1, PALO
- Version: both 2.5 and higher
- Excel Version: 2003-2007-2010
- Location: Netherlands
- Contact:
Re: Rules in test cube not consolidating in production cube
Hi,
Rules at C: level often are a bit problematic, as they compete with the standard hierarchy consolidations. In a multidimensional cube there are several consolidation paths. TM1 automatically chooses the (perfomance) optimal consolidation path.
It could be that the consolidation path TM1 chooses is different between your two servers. You can force the required consolidation path using the ConsolidateChildren rules function.
Michel
Rules at C: level often are a bit problematic, as they compete with the standard hierarchy consolidations. In a multidimensional cube there are several consolidation paths. TM1 automatically chooses the (perfomance) optimal consolidation path.
It could be that the consolidation path TM1 chooses is different between your two servers. You can force the required consolidation path using the ConsolidateChildren rules function.
Michel
- Martin Ryan
- Site Admin
- Posts: 2003
- Joined: Sat May 10, 2008 9:08 am
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: Rules in test cube not consolidating in production cube
Did you restart the service after making the .cfg change? It only kicks in after this.fonthiller wrote:Found and changed the setting. Made no difference. Wasn't sold that it would, given that the test cube successfully handles the different N- & C- level formulae.
I had exactly the same problem once (moving a rule from dev to live and C rules stopped working) and it was because of this.
Are you copying your entire rule from the test server to the live server? If you're trying to surgically add lines then Steve's solution is more likely correct.
Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Jodi Ryan Family Lawyer
-
- Posts: 5
- Joined: Mon May 03, 2010 6:11 pm
- OLAP Product: TM1
- Version: 9.4
- Excel Version: 2007
Re: Rules in test cube not consolidating in production cube
Thumbs up to Steve...
Moved the block of code from 2/3 the way down the file to the very top.
Interestingly, all the code that had been above it was written by QueBit. So it would seem that somewhere in there, their code nullifies the ability to have separate N- & C- level calcs.
Appreciate the responses!
Moved the block of code from 2/3 the way down the file to the very top.
Interestingly, all the code that had been above it was written by QueBit. So it would seem that somewhere in there, their code nullifies the ability to have separate N- & C- level calcs.
Appreciate the responses!
- Martin Ryan
- Site Admin
- Posts: 2003
- Joined: Sat May 10, 2008 9:08 am
- OLAP Product: TM1
- Version: 10.1
- Excel Version: 2010
- Location: Wellington, New Zealand
- Contact:
Re: Rules in test cube not consolidating in production cube
The only way to properly nullify it is via that cfg parameter I mentioned. What's happening here is that rules work on a first come first served basis. The first rule that can be applied to a cell is applied. Any subsequent rules that would also be applied to that cell are ignored, that's why order of the rules is so important.fonthiller wrote: Interestingly, all the code that had been above it was written by QueBit. So it would seem that somewhere in there, their code nullifies the ability to have separate N- & C- level calcs.
Presumably there's a rule that was written with an N or C qualifier, so applied to all types of cells. This rule was getting applied before the system got to your new rule.
Martin
Please do not send technical questions via private message or email. Post them in the forum where you'll probably get a faster reply, and everyone can benefit from the answers.
Jodi Ryan Family Lawyer
Jodi Ryan Family Lawyer