Page 1 of 1

Create dimension problem

Posted: Mon May 18, 2009 8:23 am
by kennyyeung
MY hierarchy like

A -B - B
| -C - D
(see attached)

When building the dimension using TI ,a circlar refernece expection occur .
what can i do if i need to create that kind of hierarchy ?

Re: Create dimension problem

Posted: Mon May 18, 2009 8:53 am
by belair22
Unfortunately you can't create that kind of Exact hierarchy. You can't have a parent (B) with the same name as any of its child (B). TM1 allows for 'ragged hierarchies' - essentially you can do away with the "B" parent in Level 1 (the remaining "B" element is still Level 0, but remains a sibling of "C").

Re: Create dimension problem

Posted: Mon May 18, 2009 12:04 pm
by lotsaram
As belair22 says in TM1 there is no need for such a hierarchy as TM1 supports "ragged" or "unbalanced" hierarchies. Thus for example one branch of a tree could have 8 levels and another only 2. This allows you to build TM1 dimensions with structures that accurately reflect organisational structures rather than have to artificially fill hierarchies to meet the requirements of a database.

The error you are getting is exactly as is says, a circular reference, as a child cannot be it's own parent. Every element in a TM1 dimension must have a unique name and therefore you can't have 2 different element definitions for the same element name.

If you absolutely have to have the exact structure you have illustrated the only way in TM1 would be to prefix/suffix a hierarchy level or similar construct to element names. However in a TM1 model it would usually be considered bad practice to have single child parents as such structures are unnecessary.

Re: Create dimension problem

Posted: Mon May 18, 2009 1:35 pm
by kennyyeung
"Every element in a TM1 dimension must have a unique name" . is that the attribute also have to be unique ?

Re: Create dimension problem

Posted: Mon May 18, 2009 3:00 pm
by Andy Key
Attributes only have to be unique if they are defined as being of type Alias. Text type attributes can be the same for multiple elements

Re: Create dimension problem

Posted: Mon May 18, 2009 9:36 pm
by lotsaram
Kenny,

To elaborate further on Andy's answer an alias can have the same string value as the underlying element name but cannot be the same string as another element.

Alias type attributes must be unique. (You can think of them as being "alternate primary keys to the dimension member master fact table" if that helps). For string and numeric attributes anything goes.

Re: Create dimension problem

Posted: Wed May 20, 2009 4:21 pm
by iesak
is it possible to give a unique key for each element in the hierarchy, then create a lookup cube and use DBR funciton to map the name on the report level?

Re: Create dimension problem

Posted: Thu May 21, 2009 8:38 am
by Andy Key
Yes it is possible. But is there any reason why you wouldn't just use an Alias?

Re: Create dimension problem

Posted: Thu May 21, 2009 9:22 am
by lotsaram
I think you want to cover the situation where multiple elements might have the same description but you still want that description to display in the report? Yes this can be easily done with a string attribute (no need for lookup cube) and use DBRA to return the value in your report (and hide the column with the actual element names).

This is easy to do if your report is in Excel/TM1 web but there is no way to do this in the cube viewer or EV (not sure about analysis studio haven't played with it enough yet).

Re: Create dimension problem

Posted: Fri May 22, 2009 6:13 am
by kennyyeung
Thanks you brother !
That exactly what i'm trying to do .