Parameterizing ConsolidateChildren?

Post Reply
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Parameterizing ConsolidateChildren?

Post by fleaster »

Ok let's take a simple example:

['LineA'] = ConsolidateChildren('Account');
['LineB'] = ConsolidateChildren('Account');
['LineC'] = ConsolidateChildren('Account');

...assuming I have multiple instances where a ConsolidateChildren is required, but dont wish to keep updating rules or hardcoding, what options are there to parameterize?

e.g. flag accounts that require consolidation and run an if statement?

Code: Select all

[] =  If(  AttrS('Account',Account,'Flag')@='Consolidate'  ,   ConsolidateChildren('Account'),  continue  ;
...would something like this work, or would it totally crash my cube? =)

Cheers,

Matt
David Usherwood
Site Admin
Posts: 1458
Joined: Wed May 28, 2008 9:09 am

Re: Parameterizing ConsolidateChildren?

Post by David Usherwood »

I use this where I want numbers added up but not fed. Here's an example from a real world, immense model:

Code: Select all

['Modelled',{'Value','Prior','Starting Value'}] =
  if(attrn('CR Line',!CR Line,'ConsolChildren') = 1,
  consolidatechildren('CR Line'),
#else
  continue);
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Re: Parameterizing ConsolidateChildren?

Post by fleaster »

cool thanks for that :)

..out of curiosity, does anyone know what impact on memory it has, if ConsolidateChildren is turned on/off via parameters? e.g. I'm thinking like how Feeders tend to stay in memory, whether something similar occurs for Consolidate Children...

cheers :)

Matt
Duncan P
MVP
Posts: 600
Joined: Wed Aug 17, 2011 1:19 pm
OLAP Product: TM1
Version: 9.5.2 10.1 10.2
Excel Version: 2003 2007
Location: York, UK

Re: Parameterizing ConsolidateChildren?

Post by Duncan P »

ConsolidateChildren is a function just like any other. When you (or any calculation) query a cell for which it is part of the calculation (and not bypassed by an IF) then it queries each of the direct children on the specified dimension(s), regardless of whether they are fed or not, and calculates each in turn. This is the reason for it's poor performance in some cases. The single-cell result and the constituent direct children from which it was derived can (and probably will) get put into the calculation cache, but that is all.
fleaster
Regular Participant
Posts: 167
Joined: Wed Mar 30, 2011 11:57 pm
OLAP Product: TM1
Version: 10.2.2
Excel Version: XL2010

Re: Parameterizing ConsolidateChildren?

Post by fleaster »

i see.. thanks for the tip :)
Post Reply