Page 1 of 1

Consolidation not working with Skipcheck off

Posted: Wed Oct 20, 2010 8:46 am
by dan.kelleher
Hi,

I have a cube with 3 dimensions, a time dimension that has 5 levels, day, week, month, quarter and year, the Cube control dimension and a flat measures dimension.

The measures dimension contains Day, Week, Month, Quarter and Year elements.

The idea is to populate the Day element with a 1 when data is loaded into that day in the respective cube.

The Week element will then be rule-driven:

Code: Select all

['Week'] =  
 IF(ELLEV('Time Daily', !Time Daily) = 1,
  DB('DataLoad Status Daily',!}Cubes, ATTRS('Time Weekly', !Time Daily, 'LastPeriod'),'Day'),
 STET);
so that it equals the last day of the week (i.e. a 1 if the last day of the week is populated)

This works fine, however I get a consolidation issue:

I have no Skipcheck or feeders in this rule, however, the Week element seems to consolidate the n level elements (which are always zero) rather than the calculated level 1 elements (see highlighted cell in attached screenshot).

Any ideas?

Thanks,

Dan
screen.JPG
screen.JPG (59.4 KiB) Viewed 2590 times

Re: Consolidation not working with Skipcheck off

Posted: Wed Oct 20, 2010 9:05 am
by dan.kelleher
ConsolidateChildren() function in the reference guide has sorted me out:

Code: Select all

['Week'] = 
  IF(ELLEV('Time Daily', !Time Daily) = 1,
  DB('DataLoad Status Daily',!}Cubes, ATTRS('Time Weekly', !Time Daily, 'LastPeriod'),'Day'),
  ConsolidateChildren('Time Daily'));
Thanks,

Dan

Re: Consolidation not working with Skipcheck off

Posted: Wed Oct 20, 2010 9:32 am
by lotsaram
dan.kelleher wrote:This works fine, however I get a consolidation issue:

I have no Skipcheck or feeders in this rule, however, the Week element seems to consolidate the n level elements (which are always zero) rather than the calculated level 1 elements (see highlighted cell in attached screenshot).

Any ideas?
Hi Dan, this is expected behaviour. The thing to understand is that if a rule does not apply to a consolidated cell then the way that TM1 calculates consolidations is not via calculating the intermediate nodes but by jumping directly from the leaf cells to the node being evaluated and applying the aggregated hierarchy weightings. To override this default calculation behaviour you need to apply either an additive rule or ConsolidateChildren (whichever is more appropriate for what you need to do), which is what you have done, so nicely solved. ;)

You might either want to add an extra condition to your IF statement to Stet out if 'Time Daily' is level 0 or else apply the C: filter to the rule though as I'm not sure how TM1 would handle ConsolidateChildren when applied to a leaf node of the dimension, it could return an undefined value (don't know .. never tested.)