Retrieving Alias from Dimension to another

Post Reply
ARNOJ
Posts: 18
Joined: Tue Oct 08, 2013 2:24 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010 SP1

Retrieving Alias from Dimension to another

Post by ARNOJ »

Morning,

I have two dimensions for accounting purpose. One dimension has an attribute that I need in the other dimension.
Dimension1 is the dimension that have the alias I need
Dimension2 is the dimnesions that need the receive the alias

therefore I have open the security object and create a rules in the dimension that need the tribute from the other one.

I have code like this :

['Acct']=S:
DB('}ElementAttributes_Dimension1',!Dimension,'Acct');

I have an error message.

however if I code a spefic account this working
['Acct']=S:
DB('}ElementAttributes_Dimension1','123456','Acct');

I don't understand what I am doing wrong

Thanks

BEst REgards

ArnoJ
Please note that English is not my native language.
User avatar
qml
MVP
Posts: 1096
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: Retrieving Alias from Dimension to another

Post by qml »

Try the following:

['Acct']=S: DB('}ElementAttributes_Dimension1',!Dimension2,'Acct');

Please note that Dimension1 needs to be a reference to the dimension existing in the cube you are writing the rule for, not the source cube.

Oh, and by the way, it is much better for performance if you copy the alias values using a TI process, not a rule.
Kamil Arendt
ARNOJ
Posts: 18
Joined: Tue Oct 08, 2013 2:24 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2010 SP1

Re: Retrieving Alias from Dimension to another

Post by ARNOJ »

Thanks for your help

I use the rules because it is only way I know

I will be please to learn the TI Process way
Please note that English is not my native language.
lotsaram
MVP
Posts: 3703
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Retrieving Alias from Dimension to another

Post by lotsaram »

You need to also remember that calling AttrS(Dim or DB(ElementAttributes_Dim to retrieve an attribute value that is an alias may retrieve a blank string if the alias value is the same as the element principal name as TM1 doesn't store the alias string where it is a match to the element name unless explicitly told to do so.
Post Reply