I'm fairly new to TM1 TI and a bit lost/confused in trying to build this location hierarchy: ALL LOCATIONS BY BUSINESS UNITS > Assetbusinessunit > Parent > Child
Here is a sample source data set extracted from external database:
Parent, Child, Assetbusinessunit
3000580_TOT, 3000580, EOS
3000581_TOT, 3000581, EOS
3000582_TOT, 3000582, EOS
3000583_TOT, 3000583, EOS
3000584_TOT, 3000584, EOS
3000585_TOT, 3000585, EOS
LEGACY ALL BUSINESS UNITS_TOT, 3000580_TOT, EOS
LEGACY ALL BUSINESS UNITS_TOT, 3000581_TOT, EOS
LEGACY ALL BUSINESS UNITS_TOT, 3000582_TOT, EOS
LEGACY ALL BUSINESS UNITS_TOT, 3000583_TOT, EOS
LEGACY ALL BUSINESS UNITS_TOT, 3000584_TOT, EOS
LEGACY ALL BUSINESS UNITS_TOT, 3000585_TOT, EOS
Here is the TI I used to build the hierarchy:
Code: Select all
**prolog tab**
cDimName = 'Maximo Location' ;
cBusUnit = 'ALL LOCATIONS BY BUSINESS UNITS';
**metadata tab**
IF(DIMIX(cDimName, Child)=0);
DIMENSIONELEMENTINSERT(cDimName, '', Child, 'N');
ENDIF;
IF(DIMIX(cDimName, Parent)=0);
DIMENSIONELEMENTINSERT(cDimName, '', Parent, 'C');
ENDIF;
DIMENSIONELEMENTCOMPONENTADD(cDimName,Parent, Child, 1);
IF(DIMIX(cDimName, Assetbusinessunit)=0);
DIMENSIONELEMENTINSERT(cDimName, '', Assetbusinessunit, 'C');
ENDIF;
DIMENSIONELEMENTCOMPONENTADD(cDimName, Assetbusinessunit, Parent, 1);
IF(DIMIX(cDimName, cBusUnit)=0);
DIMENSIONELEMENTINSERT(cDimName, '', cBusUnit, 'C');
ENDIF;
DIMENSIONELEMENTCOMPONENTADD(cDimName,cBusUnit, ASSETBUSINESSUNIT, 1);
ALL LOCATIONS BY BUSINESS UNITS (c)
--EOS (c)
----LEGACY ALL BUSINESSUNITS_TOT (c)
------300580_TOT (c)
--------300580 (n)
When I execute my TI process and view the expanded dimension, both Child and Parent appears twice, once under 'EOS' (Assetbusinessunit)and once under 'ALL LOCATIONS BY BUSINESS UNITS' (see attached screenshot "hierarchy.JPG"). However looking at a leaf elements (e.g. 300580), both have the same index (4).
So my question is have I done something wrong with the TI, or do I have to tune the source data extract SQL, or something completely different?
Hope someone can provide some guidance or point me to the right post to try and resolve this.
Cheers.
Ray