Page 1 of 1

Issue Creating Unbalanced Hierarchy

Posted: Wed Oct 24, 2012 5:57 am
by kkmk
Hi,

I am facing a problem while creating an unbalanced hierarchy dimension.
Please find attached input file format and the dimension created out of this file. Five variables given in the variable tab and I am checking condition for each variable.
I am using a TI process to crate this dimension and the Metadata script I have written is:

IF (Variable5 @<> '');

DIMENSIONELEMENTINSERT('Sample PnL','',Variable1,'c');
DIMENSIONELEMENTINSERT('Sample PnL','',Variable2,'c');
DIMENSIONELEMENTINSERT('Sample PnL','',Variable3,'c');
DIMENSIONELEMENTINSERT('Sample PnL','',Variable4,'c');
DIMENSIONELEMENTINSERT('Sample PnL','',Variable5,'n');
DIMENSIONELEMENTCOMPONENTADD('Sample PnL',Variable1,Variable2,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Sample PnL',Variable2,Variable3,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Sample PnL',Variable3,Variable4,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Sample PnL',Variable4,Variable5,1.000000);

ELSEIF (Variable4 @<> '');

DIMENSIONELEMENTINSERT('Sample PnL','',Variable1,'c');
DIMENSIONELEMENTINSERT('Sample PnL','',Variable2,'c');
DIMENSIONELEMENTINSERT('Sample PnL','',Variable3,'c');
DIMENSIONELEMENTINSERT('Sample PnL','',Variable4,'n');
DIMENSIONELEMENTCOMPONENTADD('Sample PnL',Variable1,Variable2,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Sample PnL',Variable2,Variable3,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Sample PnL',Variable3,Variable4,1.000000);

ELSEIF (Variable3 @<> '');

DIMENSIONELEMENTINSERT('Sample PnL','',Variable1,'c');
DIMENSIONELEMENTINSERT('Sample PnL','',Variable2,'c');
DIMENSIONELEMENTINSERT('Sample PnL','',Variable3,'n');
DIMENSIONELEMENTCOMPONENTADD('Sample PnL',Variable1,Variable2,1.000000);
DIMENSIONELEMENTCOMPONENTADD('Sample PnL',Variable2,Variable3,1.000000);

ELSEIF (Variable2 @<> '');

DIMENSIONELEMENTINSERT('Sample PnL','',Variable1,'c');
DIMENSIONELEMENTINSERT('Sample PnL','',Variable2,'n');
DIMENSIONELEMENTCOMPONENTADD('Sample PnL',Variable1,Variable2,1.000000);

ELSE;

DIMENSIONELEMENTINSERT('Sample PnL','',Variable1,'n');
ENDIF;

Problem:The Hierarchy given in the file and the hierarchy created in the dimension are different. TRAV & ENT element is in both consolidation 9007 & 9008, and only one element in TRAV & ENT under 9007 consolidation but it include 9008 TRAV & ENT elements also. Do I need to add / modify any coding?
Please Help.

Thanks
kkmk

Re: Issue Creating Unbalanced Hierarchy

Posted: Wed Oct 24, 2012 6:34 am
by declanr
Either change it so its unique (e.g. v4 | ' - ' | v5 ) or looking at that file possibly just insert v5 straight under v3 and stick v4 in as an attribute.

Without knowing your account structure I can't really say what is the correct thing to do but your TI is doing exactly what you are telling it to.

BTW I am assuming that V1 is the left most column through to v5 on the right...

Re: Issue Creating Unbalanced Hierarchy

Posted: Wed Oct 24, 2012 7:16 am
by Steve Rowe
This might be better served by two dimensions?
Aren't the 9000 codes cost centres / departments / profit centres of some kind and then Trav & Ent and 600000 and so on your account structure.

As declanr said, your TI is doing what you told it to but you need to figure out what your account structure and dimensionality is.

In general I normally try and split the account struture into many dimensions as it usually enhances the utility of the cube.
Cheers