Edit alias using cube Element attribute

Post Reply
mail_kupi
Posts: 22
Joined: Wed Jan 26, 2011 3:06 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2003

Edit alias using cube Element attribute

Post by mail_kupi »

Hi Everyone,

I try to make alias that is SUBST from own element. i found cube }element attribute save the attribute value and i can use rule to modified.
but i cannot used function in there SUBST([ELEMENT],1,4). any sugestion?

Thanks for your attention
tomok
MVP
Posts: 2836
Joined: Tue Feb 16, 2010 2:39 pm
OLAP Product: TM1, Palo
Version: Beginning of time thru 10.2
Excel Version: 2003-2007-2010-2013
Location: Atlanta, GA
Contact:

Re: Edit alias using cube Element attribute

Post by tomok »

Aliases have to be unique. If you are trying to create an alias that consists of just the first four characters of the element name are you certain that there are no duplicates when you limit yourself to just looking at the first four characters of the elements?
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Andy Key
MVP
Posts: 352
Joined: Wed May 14, 2008 1:37 pm
OLAP Product: TM1
Version: 2.5 to PA
Excel Version: Lots
Location: Sydney
Contact:

Re: Edit alias using cube Element attribute

Post by Andy Key »

If you are creating a rule on an }ElementAttribute cube, all rules have to be written as S: (even if the attribute is defined as numeric, which isn't the case here as you are talking about aliases) and so have to use the DB() style reference rather than [ ] even though it is an internal reference.

Or if you are only refering to the dimension element won't

Code: Select all

['AttributeName'] = S: SubSt( !DimensionName, 1, 4);
Do what you want?
Andy Key
User avatar
mattgoff
MVP
Posts: 518
Joined: Fri May 16, 2008 1:37 pm
OLAP Product: TM1
Version: 10.2.2.6
Excel Version: O365
Location: Florida, USA

Re: Edit alias using cube Element attribute

Post by mattgoff »

mail_kupi wrote:I try to make alias that is SUBST from own element. i found cube }element attribute save the attribute value and i can use rule to modified.
but i cannot used function in there SUBST([ELEMENT],1,4). any sugestion?
To amplify the part of Andy's post that I think contains the solution: you need to use the !dimname notation.

Matt
Please read and follow the Request for Assistance Guidelines. It helps us answer your question and saves everyone a lot of time.
mail_kupi
Posts: 22
Joined: Wed Jan 26, 2011 3:06 pm
OLAP Product: TM1
Version: 9.5.1
Excel Version: 2003

Re: Edit alias using cube Element attribute

Post by mail_kupi »

Ok guys.. thanx a lot for the suggestion
i will try it...

really.. really.. thanx..
John Hammond
Community Contributor
Posts: 300
Joined: Mon Mar 23, 2009 10:50 am
OLAP Product: PAW/PAX 2.0.72 Perspectives
Version: TM1 Server 11.8.003
Excel Version: 365 and 2016
Location: South London

Re: Edit alias using cube Element attribute

Post by John Hammond »

Thanks Andy - you saved my bacon with your answer.

As another point of interest even Text attributes are coded as N level elements in the attributes dimension rather than strings...
Post Reply