How to implement multiple hierarchies in single dimension?

Post Reply
abcuser
Posts: 133
Joined: Thu Mar 25, 2010 8:34 am
OLAP Product: Cognos TM1
Version: 9.5.2
Excel Version: 0

How to implement multiple hierarchies in single dimension?

Post by abcuser »

Hi,
using TM1 v9.5.2 on Windows 2008 RC2 I would like to implement multiple hierarchies in single dimension.
To demonstrate my problem I have created simple sample (see picture bellow).

I have "Product type" dimension with top most member name "Product type". Children of "All products" are all of the products available in company. Each product from 'All products' list can belong to zero or multiple sub-groups (Grows on trees, Drupe etc), for example Ananas is only located in "All products" group. Banana belongs to "All products" and "Grows on trees" group. Cherry belongs to "All products", "Grows on trees" and "Drupe".

How to implement this kind of multi-hierarchy in TM1? I used to work with Oracle Hyperion Essbase cube server where children of "Grows on trees" and "Drupe" were marked as "Shared member". Is there something like that in TM1 or some other solution?
Regards
Attachments
product_type.png
product_type.png (3.21 KiB) Viewed 4904 times
User avatar
qml
MVP
Posts: 1098
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: How to implement multiple hierarchies in single dimensio

Post by qml »

The simple answer is - you just build your hierarchy like that and it will work fine. There is nothing special you need to do in TM1 to make it work. All N elements in a dimension can belong to multiple hierarchies, can have as many parents as you want (within reason) and also, can have different weights in each of the consolidations they belong to.
Also, "ananas" in English is nothing else than a good old pineapple. ;)
Kamil Arendt
abcuser
Posts: 133
Joined: Thu Mar 25, 2010 8:34 am
OLAP Product: Cognos TM1
Version: 9.5.2
Excel Version: 0

Re: How to implement multiple hierarchies in single dimensio

Post by abcuser »

Hi,
it looks like it is VERY important how the input data are organized! If data are in the 'level like' format:

Code: Select all

Level 2      | Level 1      | Level 0
--------------------------------------
Product type | All products | Banana
Product type | All products | Ananas
Product type | All products | Apple
Product type | All products | Cherry
Product type | Grows on trees | Banana
Product type | Grows on trees | Apple
Product type | Grows on trees | Cherry
Product type | Drupe | Apple
Product type | Drupe | Cherry
then all data are loaded into cube without any problem. But if the data are loaded using recursive SQL, so in the 'parent child' format:

Code: Select all

Parent       |  Child
-----------------------------
Product type | All products
All products | Banana
All products | Ananas
All products | Apple
All products | Cherry
Product type | Grows on trees
Grows on trees | Banana
Grows on trees | Apple
Grows on trees | Cherry
Product type | Drupe
Drupe | Apple
Drupe | Cherry
then members are moved to the hierarchy that is last loaded.

I have rewritten and SQL in turbointegrator from second input data to first input data and now data are correctly loaded.
Just a question, is there any way to set that second format of data should not be "moved" to new hierarchy location, but instead add new leaf member when turbointegrator process is executed?
Regards
lotsaram
MVP
Posts: 3706
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: How to implement multiple hierarchies in single dimensio

Post by lotsaram »

There should be no issue with the second simple 2 column format of parent | child. In fact this is the format I usually prefer and creatin multiple hierarchies from such input is no problem at all.

If this isn't working for you then there is something wrong with your code and I would suggest that you post your code.
User avatar
Michel Zijlema
Site Admin
Posts: 713
Joined: Wed May 14, 2008 5:22 am
OLAP Product: TM1, PALO
Version: both 2.5 and higher
Excel Version: 2003-2007-2010
Location: Netherlands
Contact:

Re: How to implement multiple hierarchies in single dimensio

Post by Michel Zijlema »

abcuser wrote:it looks like it is VERY important how the input data are organized! If data are in the 'level like' format:
...
then all data are loaded into cube without any problem. But if the data are loaded using recursive SQL, so in the 'parent child' format:
...
then members are moved to the hierarchy that is last loaded.
Hi,

Not sure whether this is causing what you see, but... Please note that clicking 'All' in the subset editor will display all elements once, because of which not all consolidations are expanded when elements are part of multiple consolidations. To open up all consolidations you need to click the 'Expand all ' button (which is not the same as the 'All' button).

With both source sets described above you should be able to reach what you're after.

Michel
abcuser
Posts: 133
Joined: Thu Mar 25, 2010 8:34 am
OLAP Product: Cognos TM1
Version: 9.5.2
Excel Version: 0

Re: How to implement multiple hierarchies in single dimensio

Post by abcuser »

Hi,
I have written a recursive SQL to demonstrate the problem, but have found out that everything is working correctly. Strange, I can't reproduce the problem. I don't know how exactly my SQL was written in the first place, maybe I done some mistake when writing recursive SQL. It looks problem is solved. If in some other project I will get into this problem again I will post the sample (yes I know, I will look deeply into sample to make it sure it is really a problem).
Regards
Post Reply