Exploring TM1 - a Chartertech Company
Search
Close this search box.

Deriving an Element from an Alias in TM1

Today I needed to look up an element name from an alias. The solution involved combining the use of Dimix and DimNm.

Problem

The situation was that I have a System Settings cube which derives the date and subsequently the year, month and day from the date. The month is string and in the form “03”. I wanted to add an element that is also string that shows the month as a three-character field, like “Mar”, for example. I have a Month dimension with Jan to Dec in it and alias’ for “03” and “3” etc.

So my challenge was to lookup the Month dimension and find the value of the month in the form “03” and then return the month in the form “Mar”.

Solution

The solution to this problem was to use a combination of Dimix and DimNm as follows (along with the SubSt and Today functions as well):

['Current Month (mmm)', 'String'] = S: DIMNM( 'Month', DIMIX ('Month',  SUBST(TODAY(1),6,2) ) );

So here ‘Current Month (mmm)’ is derived by getting the index number of the two character month number from the Month dimension and then converting that to the element name using DimNm.

  • This field is for validation purposes and should be left unchanged.

Post Sections

Related Posts

John Vaughan

John Vaughan

John is a CPA, MBA and has been a Performance Management consultant for over 25 years. He is the founder of ExploringTM1 and highly regarded for his experience combining financial management with corporate planning, reporting and analysis. He lives in Sydney with his wife, two of his three children, their cat, Freckles, a bunch of chooks and some fish. John is a sports nut, who played rugby until he was 40, started playing football at 54 and loves being outdoors.

Leave a Reply

Your email address will not be published. Required fields are marked *

Log In