Adding N-Level Elements to Considation Fails

Post Reply
CiskoWalt
Posts: 46
Joined: Thu Oct 16, 2008 4:02 pm

Adding N-Level Elements to Considation Fails

Post by CiskoWalt »

Hello,

I have a file that has the following 2 columns of data: MSO Code, Contract Code

I am trying to create the following 2 hierarchies within a dim using TI.


All MSO (consolidation)
MSO Code (consolidation)
MSO Code-Contract Code (the n-level)

All by Party (consolidation)
Contract code (consolidation)
MSO Code-Contract code (the n-level)

I am unable to add the n-level elements (the concatenation of the 2 codes) to the second level (MSO Code and Contract Code)of both hierarchies.

PROLOG (Works)

dimRef='Affiliate Code';
sAllByParty = 'All by Party';
sAllMSOs = 'All MSOs';
sTotalExclOtherMSO = 'Total Excl Other MSOs';

# Dimension ElementInsert. Function Adds an element to a dimension
DimensionElementInsert(dimRef,'',sAllByParty,'c');

# Dimension ElementInsert. Function Adds an element to a dimension
DimensionElementInsert(dimRef,'',sAllMSOs,'c');

# Function adds a component (child) to a consolidated element.
DimensionElementComponentAdd (dimRef, sAllMSOs, sTotalExclOtherMSO, 1);


META DATA( works)

Meta data tab:

1) adds the MSO Id to the Total Excl Other MSOs parent
2) add the Contract Id to the All by Party parent
3) adds the Concatenation of MSO Id and Contract Id as an n-level element.

sMsoCode = TRIM (vMSO_Code);
sCPCode = TRIM(vCP_ALTID);
sMsoCPCode = sMsoCode | '-' | sCPCode;

IF (sMsoCode @= '');
ITEMSKIP;
ENDIF;


#^^ Add Alt ID to 'All by Party' Hierarchy

#^^ Add the Contract Party Code to the 'All by Party' consolidation
DimensionElementComponentAdd(dimRef, sAllByParty, sCPCode,1);

#^^ Add MSO Id to 'All MSOs' Hierarchy

#^^ Add the MSO Code to the 'Total Excl Other MSOs' consolidation
DimensionElementComponentAdd(dimRef, sTotalExclOtherMSO, sMsoCode,1);

#^^ Add the MSO Code and CP Code as N-level elements
DimensionElementInsert(dimRef,'',sMsoCPCode ,'n');

DATA tab (does not Work)

The data tab is supposed to add the n-level elements (sMsoCPCode) to the parent elements (sMsoCode and sCPCode) created in the META DATA tab.

sMsoCode = TRIM (vMSO_Code);
sCPCode = TRIM(vCP_ALTID);
sMsoCPCode = sMsoCode | '-' | sCPCode;

#^^ Add N-level child elements to the 2 Hierarchies

#^^ Add the Concatenation of MSO Code and Contract Party to the MSO Code hierarchy
DimensionElementComponentAdd (dimRef, sMSOCode, sMsoCPCode, 1);

#^^ Add N-level child to 'All MSOs' hierarchy's MSO Code Consolidated Element

#^^ Add the Concatenation of MSO Code and Contract Party to
DimensionElementComponentAdd (dimRef, sCPCode, sMsoCPCode, 1);


Thanks,

Walt
declanr
MVP
Posts: 1815
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: Adding N-Level Elements to Considation Fails

Post by declanr »

DimensionElementComponentAdd() is a metadata function and as such you should process it in the metadata tab.

HTH
Declan Rodger
User avatar
qml
MVP
Posts: 1094
Joined: Mon Feb 01, 2010 1:01 pm
OLAP Product: TM1 / Planning Analytics
Version: 2.0.9 and all previous
Excel Version: 2007 - 2016
Location: London, UK, Europe

Re: Adding N-Level Elements to Considation Fails

Post by qml »

declanr wrote:DimensionElementComponentAdd() is a metadata function and as such you should process it in the metadata tab.
I beg to differ. There is no commandment not to use this function on other tabs (bar the Data tab).

That however does not take from the fact that the OP's code should all be put on the Metadata tab, I see absolutely no reason to split it like that.
Kamil Arendt
tomok
MVP
Posts: 2832
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: Adding N-Level Elements to Considation Fails

Post by tomok »

qml wrote:
declanr wrote:DimensionElementComponentAdd() is a metadata function and as such you should process it in the metadata tab.
I beg to differ. There is no commandment not to use this function on other tabs (bar the Data tab).

That however does not take from the fact that the OP's code should all be put on the Metadata tab, I see absolutely no reason to split it like that.
There is no commandment to not put the DimensionElementComponentAdd in the Data tab, it just won't work and it's the direct reason his TI process is not working.
Last edited by tomok on Thu Sep 06, 2012 8:19 pm, edited 1 time in total.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
declanr
MVP
Posts: 1815
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: Adding N-Level Elements to Considation Fails

Post by declanr »

qml wrote:
declanr wrote:DimensionElementComponentAdd() is a metadata function and as such you should process it in the metadata tab.
I beg to differ. There is no commandment not to use this function on other tabs (bar the Data tab).

That however does not take from the fact that the OP's code should all be put on the Metadata tab, I see absolutely no reason to split it like that.
Very true of course, I was however basing it on the OP's code and should have clarified I was referring to the code that was on the data tab only, which should instead have been in the metadata.
Declan Rodger
Post Reply