Element order in a consolidation

Post Reply
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Element order in a consolidation

Post by bunchukokoy »

Hi guys.

Is there a function (although I don't see one) or a way in which I will be able to identify the element's order in a consolidation?

For example, Consolidated element A has children A1, A2, A3 in order.
I want to identify the order of A2.

Somehow like ComponentElementOrder(DimName,Parent,Child) that will return the order of the child.

Any idea?

Thanks guys. :D :D
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: Element order in a consolidation

Post by declanr »

sPar = 'A';
sCh = 'A2';

iCount = 1;
iMax = ElCompN ( sDim, sPar );

While ( iCount <= iMax );
sEl = ElComp ( sDim, sPar, iCount );
If ( sEl @= sCh );
sOrder = iCount;
iCount = iMax;
EndIf;
iCount = iCount + 1;
End;
Declan Rodger
bunchukokoy
Regular Participant
Posts: 197
Joined: Thu Dec 03, 2009 8:47 am
OLAP Product: IBM Cognos TM1
Version: 10.2.2.x
Excel Version: 2010
Location: Singapore

Re: Element order in a consolidation

Post by bunchukokoy »

Thanks very much Sir!
Post Reply