Query on SwapAliasWithPrincipalName

Post Reply
Posts: 35
Joined: Wed Sep 14, 2011 7:45 am
OLAP Product: Cognos TM1
Version: 9.5.2
Excel Version: 2003

Query on SwapAliasWithPrincipalName

Post by sreesuku » Tue Apr 17, 2018 3:35 pm

Hi Team,

I have a query on SwapAliasWithPrincipalName.

Does this function swaps the names for all elements in the dimensions with the specified alias names ?
I have created a dimension subset with selected list of elements only and used this as source in the swap TI.

I have put the function in SwapAliasWithPrincipalName(DimName,AiasName,Flag) data tab.

But I have observed that elements names are getting swapped for all elements even though I chose the subset as source

Am I missing anything here ?

Wim Gielis
Posts: 2011
Joined: Mon Dec 29, 2008 6:26 pm
OLAP Product: TM1
Version: PAL 2.0.6
Excel Version: 2016 - Office 365
Location: Brussels, Belgium

Re: Query on SwapAliasWithPrincipalName

Post by Wim Gielis » Tue Apr 17, 2018 4:47 pm

Use this function in the Prolog tab, not the Data tab.
It’s done for the entire dimension.
For elements outside the subset, use the same element name in the alias.
Best regards,

Wim Gielis

Excel Most Valuable Professional, 2011-2014
http://www.wimgielis.com ==> 109 TM1 articles and a lot of custom code
Newest blog article: Active form claustrophobia

User avatar
Community Contributor
Posts: 314
Joined: Thu Apr 18, 2013 6:59 pm
OLAP Product: TM1
Version: 10.2.2 FP7, PA2.0.05
Excel Version: 2013 PAW
Location: Cleveland, Tennessee

Re: Query on SwapAliasWithPrincipalName

Post by PavoGa » Wed Apr 18, 2018 12:13 pm

If you want to swap aliases based on subsets of elements, create an alias for swapping purposes only. Create your subset, update the alias only for your subset members, the swap the alias. The elements with unpopulated aliases will retain their original name as you probably know.

I think you can use SwapAliasWithPrincipalName in the epilog, but if not, setup a process with the necessary parameters and call it from the epilog.
Cleveland, TN

Post Reply