Issue Creating Unbalanced Hierarchy
Posted: Wed Oct 24, 2012 5:57 am
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
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