Page 1 of 1
Unique Alias
Posted: Thu Oct 27, 2011 10:13 am
by CoN73mP7
Hi,
I've got a problem with the definition of alias to be unique. I am to build a cube of existing Data. This cubes are build in Cognos 8 where it seems that the names (not the ids) of elements don't have to be unique and so there are Elements with the same Name.
Is there a way for TM1 to handle this?
Alex
Re: Unique Alias
Posted: Thu Oct 27, 2011 10:50 am
by qml
First, create alphanumeric codes for this dimention to be the principal names of its elements.
Then create a normal text attribute "Name" to store your non-unique descriptions.
Finally, create an alias and force its values to be unique by combining the names with elements' codes to create a "Code and Name" type of alias. Its values can even be rule-calculated, like that:
Code: Select all
['Code and Name'] = S:
IF(ATTRS('Dim', !Dim, 'Name') @<> '',
'[' | !Dim | '] ' | ATTRS('Dim', !Dim, 'Name'),
STET);
Re: Unique Alias
Posted: Thu Oct 27, 2011 11:08 am
by CoN73mP7
Sounds interessting, but I don't think I really understand the last step.
For each Dimension
DimensionCreate('DimName');
AttrInsert('DimName', '', 'ElementName', 'S');
AttrInsert('DimName', '', 'Alias', 'A');
For each Element in a Dimension
DimensionElementInsert('DimensionName','', 'UniqueElement1', 'N');
DimensionElementInsert('DimensionName','', 'UniqueElement1', 'N');
Then I Set a not unique Name with the function AttrPutS()
How do I continue to get the Attribute as an Alias?
I just looked at your rule. What your doing is just to connect the id with a name? But then the displayed name always displays the id with the name? If so, thats not what I'm looking for! Then I cold just as well add a unique number to the Alias!
Re: Unique Alias
Posted: Thu Oct 27, 2011 11:36 am
by qml
CoN73mP7 wrote:I just looked at your rule. What your doing is just to connect the id with a name? But then the displayed name always displays the id with the name? If so, thats not what I'm looking for! Then I cold just as well add a unique number to the Alias!
Alias values
have to be unique. I just gave you one way of ensuring that. If you don't think it suits your needs, then you are welcome to come up with a different approach. There is no need to shout at me for trying to be helpful.
Re: Unique Alias
Posted: Thu Oct 27, 2011 11:47 am
by CoN73mP7
I'm not shouting ?!? I was just asking if I understood your suggestion right. And in that Case I wrote that it was not what I was looking for. At no time I did mean to offend anybody. I'm sorry if you took it as shouting or anything like this
Alex
Re: Unique Alias
Posted: Thu Oct 27, 2011 1:59 pm
by qml
CoN73mP7 wrote:I'm not shouting ?!?
This is what exclamation marks denote in both English and German - they are used to indicate strong feelings or high volume, also known as shouting. You used two of them in your last two sentences.
Anyway, it's beside the main point, which is that, pretty obviously, you can't have a non-unique alias in TM1. You need to come up with something else.
Re: Unique Alias
Posted: Thu Oct 27, 2011 4:44 pm
by TheEnforcer
Please, let us not drag this out in to an Etiquette discussion.
Shouting or not, the simple answer is TM1 must hold a unique value for each and every element and their aliases. That means if you have 2 aliases set for each element, there must be no duplicates across ANY of them. This is why when you create an alias TM1 automatically populates each alias with the element name (blanks would be duplicates and therefore not unique).
If you think about the functionality you get with aliases it should be plainly obviously as to why this is the case. Most of the Excel formula that references either an element name or alias will work regardless. A TI can load data using either an element name or alias. None of that could possibly work if the same name could be used as an alias for multiple elements.
Simples
