Counting N Level Elements

Post Reply
RSK
Posts: 49
Joined: Mon Oct 08, 2012 12:02 pm
OLAP Product: TM1 10.1.1
Version: TM1 10.1.1
Excel Version: 2010

Counting N Level Elements

Post by RSK »

I appear to be having a dumb day today, I'm struggling to create a count of N level elements within a customer of Hierarchy each rolling up to their respective consolidations it hierarchy.

In affect my rule is creating a flag against level zero elements which works fine, the problem is I can't get it to feed and therefore the consolidations are Zero.

Code: Select all

['Total Availability'] 		=N: IF (ELLEV('BP_TAR_Customers',!BP_TAR_Customers) = 0,1,CONTINUE);	

FEEDERS;

['Total Availability']=>['Total Availability']


I am I being stupid?
declanr
MVP
Posts: 1831
Joined: Mon Dec 05, 2011 11:51 am
OLAP Product: Cognos TM1
Version: PA2.0 and most of the old ones
Excel Version: All of em
Location: Manchester, United Kingdom
Contact:

Re: Counting N Level Elements

Post by declanr »

Code: Select all

['Total Availability']=>['Total Availability']
This is just trying to feed a cell from itself which is never going to work... unless the cell is already fed from elsewhere and then there is no point.

You could just set up a 2-d cube with a 1 in it somewhere and then feed a total consolidation in "BP_Tar_Customers" which would in turn feed all of its leaf level elements.

For something like this though it would probably make sense to have an attribute for the dimension and populate it via TI to avoid the rule overhead altogether, if you build the dimension from TI anyway you can make sure it is always up to date. If its not built by TI then you would of course need to run the new TI everytime a customer was added manually... or if it was just 1 customer go through and do it manually in the attribute.
Declan Rodger
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Counting N Level Elements

Post by tomok »

Do you need to know the count along all the dimensions in the cube or just the customer dimension? If it is just the customer dimension I would create a 2-D cube with Customer and Measure dims. In the Measure dim I would have one element called Total Availability. Then the rule file for this 2-D cube would be:

Code: Select all

['Total Availability']=1;
No SKIPCHECK or FEEDERS. The cube will be small so not using SKIPCHECK won't really matter. If you need the count across multiple dimensions I would load a value of 1 to the Total Availability element in every leaf intersection of the original cube. Then no feeding is necessary. it should be pretty easy to write a TI process to populate every leaf intersection of Total Availaibilty.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Post Reply