Insert N-Element between consolidations, not at the lower end

Post Reply
st2000
Posts: 62
Joined: Mon Aug 15, 2016 8:48 am
OLAP Product: TM1 (Windows) & SSAS 2014 Ent.
Version: 10.2.0 FP3
Excel Version: Excel 2013
Location: Hamburg, DE, EU
Contact:

Insert N-Element between consolidations, not at the lower end

Post by st2000 »

I struggle actually with a challenge, which seemed to be easy, but isn't (just for me, hopefully...)

I have a cube which I want to divide into distributed subcubes. This is my dimension used to control, what chunks will be created:
Mastercube.png
Mastercube.png (2.67 KiB) Viewed 2539 times
I want to derive a summary cube, which collects the All-values from the subcubes, marked here with colored boxes. This works good, also the summary cube is generated. But in case I have a consolidation like Tob2c (the blue one, which is directly under the summary cubes ALL of this control dimension), I don't manage to come over this result:
DerivedTopCube.png
DerivedTopCube.png (2.85 KiB) Viewed 2539 times
After deleting the connecting consolidations and recreating them as N-elements, that one was inserted by

Code: Select all

DimensionElementInsert('ControlDim', '', 'Tob2c','n');
and added under the ALL with

Code: Select all

DimensionElementComponentAdd( 'ControlDim', 'ALL', 'Tob2c', 1);
Tob2c unfortunately has no prior parent I could add it to again, as it resides directly under ALL anyway. But in the preceding dim design (picture 1/blue) it was placed between Top4 and Top2b, now TM1 always inserts it at the end of the dim (as noticed in the TM1_ref.pdf:
If this parameter is empty, the new
element is added to the end of the
dimension.
I tried many things to get the Tob2c-node at the old position (picture 2/red line), but not really have success up to now. :roll:
Am I missing something obvious ?

What I'm looking for is a TI command which does the same thing like I use the dimension structure editor and move the element to there by drag and drop... I guess behind the scenes some of the elements param's are manipulated, which I should control also via TI.

Any hint is highly appreciated...
-----------------------------------
Best regards,
Stefan
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: Insert N-Element between consolidations, not at the lower end

Post by tomok »

You have limited control over the order of elements in a dimension via TI. There are two properties of a dimension (in the }DimensionProperties cube) called SORTELEMENTSTYPE and SORTCOMPONENTSTYPE. Here is what they do:

SORTELEMENTSTYPE - this controls the sort for the main elements in the dimension (not the sort order of the children underneath their parent). You can either have the elements sorted BYHIERARCHY, which means the order in which they were added to the dimension or (or from the Insertion Point param in the DIMENSIONELEMENTINSERT function in TI) or BYNAME, which means alphabetically.

SORTCOMPONENTSTYPE - this controls the sort order of the children under a parent. You can either have the elements sorted BYHIERARCHY, which means the order in which they were added as a component of the parent or BYNAME, which means alphabetically.

To fine tune the order of a dimension to be something other than the above your only choice is an XDI worksheet.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
st2000
Posts: 62
Joined: Mon Aug 15, 2016 8:48 am
OLAP Product: TM1 (Windows) & SSAS 2014 Ent.
Version: 10.2.0 FP3
Excel Version: Excel 2013
Location: Hamburg, DE, EU
Contact:

Re: Insert N-Element between consolidations, not at the lower end

Post by st2000 »

OK, so I have to prepare the elements to be named according to a sorting method ByName afterwards, or accept it as is (as I want to avoid manual development via Excel).
Thank you very much, Tom.
-----------------------------------
Best regards,
Stefan
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: Insert N-Element between consolidations, not at the lower end

Post by tomok »

You don't have to use BYNAME, you can use BYHIERARCHY. However, you have to know where each element goes in the hierarchy, in relation to each other so that when you supply the Insertion Point parameter value in the DIMENSIONELEMENTINSERT function your element goes where you want it. This only applies to inserting the element into the dimension, it won't let you move it somewhere else later. You can only do that via the .XDI worksheet or the Dimension Editor. The bottom line is that controlling the order of elements in a dimension via TI is no easy task and not very flexible. It's one of the weak links in the TM1 feature set IMO.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Post Reply