How to change index in demension

Post Reply
Yukiya
Posts: 22
Joined: Wed Jun 30, 2010 3:53 am
OLAP Product: TM1
Version: 102
Excel Version: 2010

How to change index in demension

Post by Yukiya »

Hello,

I have a dimension called "Month", and a dimension contains each month, OB (Opening Balance) and CB (Closing Balance).
However there are wrong assign of index, so I'd like to amend a few index of it.

Current,
Name Index
Jan 1
OB 2
Feb 3
Mar 4
...

Should be,
Name Index
OB 1
Jan 2
Feb 3
Mar 4
....

I would appreciate it if someone could kindly tell me how to change index.

Regards,
User avatar
Alan Kirk
Site Admin
Posts: 6610
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: How to change index in demension

Post by Alan Kirk »

Yukiya wrote: I have a dimension called "Month", and a dimension contains each month, OB (Opening Balance) and CB (Closing Balance).
However there are wrong assign of index, so I'd like to amend a few index of it.

Current,
Name Index
Jan 1
OB 2
Feb 3
Mar 4
...

Should be,
Name Index
OB 1
Jan 2
Feb 3
Mar 4
....

I would appreciate it if someone could kindly tell me how to change index.
It depends on how you're maintaining the dimension. If you're using a dimension worksheet (also known as an .xdi, the superior way of maintaining dimensions manually, may I add :D ), the order will simply follow the order of elements as you have them in the sheet. You can therefore arrange them the way you want on the dimension worksheet, save it and you're done.

If not, there are a couple of ways of specifying the sort order of a dimension though they don't look like they'd work for you here. That means going into the Dimension Editor.

Right click on the dimension and select "Edit Dimension Structure..."

In your case, select "OB" and then cut it. ([Ctrl]+[X] or use the Edit menu). This will possibly result in a dialog asking:

"Are you sure you want to delete all instances of the selected elements from the dimension?"

Which of course you don't, but as long as you put the element back before you save the dimension you shouldn't lose the data. Not in any version that I've used anyway, but you may want to test it on your Dev system first just to be sure. (I'm not a fan of the Dimension Editor; I don't trust it at all but many people do.)

Select the Jan element, right click and select "Paste Above". OB should now appear above Jan. Save the dimension.

That should move OB to position 1 and Jan to position 2.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
Andy Key
MVP
Posts: 351
Joined: Wed May 14, 2008 1:37 pm
OLAP Product: TM1
Version: 2.5 to PA
Excel Version: Lots
Location: Sydney
Contact:

Re: How to change index in demension

Post by Andy Key »

Just as an extra to Alan's method, click on the Set Dimension Order button after you have done the Paste Above.
Andy Key
Yukiya
Posts: 22
Joined: Wed Jun 30, 2010 3:53 am
OLAP Product: TM1
Version: 102
Excel Version: 2010

Re: How to change index in demension

Post by Yukiya »

Dear Alan and Andy,

Thank you for your advice.

I could change index easily.

Regards,
Yukiya
fcapell
Posts: 11
Joined: Wed Jun 13, 2012 6:46 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007
Location: São Paulo, Brazil

Re: How to change index in demension

Post by fcapell »

Hi everyone!

Is there a way of changing dimension element index number via Turbo Integrator?

Thanks!
User avatar
Alan Kirk
Site Admin
Posts: 6610
Joined: Sun May 11, 2008 2:30 am
OLAP Product: TM1
Version: PA2.0.9.18 Classic NO PAW!
Excel Version: 2013 and Office 365
Location: Sydney, Australia
Contact:

Re: How to change index in demension

Post by Alan Kirk »

fcapell wrote: Is there a way of changing dimension element index number via Turbo Integrator?
From Request for assistance guidelines (PLEASE READ)
6) Give a brief outline of what you've done to find the answer; which manuals or guides you've looked in, what tests you've done.
For example, this page in the Reference Guide, the help file that the FAQ post refers to as:
FAQ Thread wrote:Arguably the single most important document in the library. It contains descriptions of most Rules, Worksheet and TI functions, as well as a guide to Rule syntax
.
"To them, equipment failure is terrifying. To me, it’s 'Tuesday.' "
-----------
Before posting, please check the documentation, the FAQ, the Search function and FOR THE LOVE OF GLUB the Request Guidelines.
fcapell
Posts: 11
Joined: Wed Jun 13, 2012 6:46 pm
OLAP Product: TM1
Version: 10.1
Excel Version: 2007
Location: São Paulo, Brazil

Re: How to change index in demension

Post by fcapell »

Please forgive me for the lack of information in my previous post.

I'm trying to sort a dimension by hierarchy and alphabetically by its alias attribute. This dimension is loaded from an Oracle database. I could sort the records and set the dimension ordering on 'ByInput'. But the Turbo Integrator process brings consolidation levels as columns, so even though I change the query by setting an 'order by' clause on the description (alias) column, these consolidation levels won't be affected by this ordering clause.

Example:
Element Name;Description;Parent Element Name;Parent Element Description
code200;leaf aaaa;gr60;group 60
code1;leaf bbbb;gr2;group 2
code58;leaf cccc;gr2;group 2

I could change the loading process so the result set layout would be something similar to this:

Element Name;Description;Parent Element Name
code200;leaf aaaa;gr60
code1;leaf bbbb;gr2
code58;leaf cccc;gr2
gr2;group 2;gr2
gr60;group 60;gr60


But instead of changing the current loading process (which has been tested and has been running ok) I was wondering if I could change dimension elements indexes (based, for instance, on a ordered subset) in another process.

I've tried the approach described here but I'm not totally confident using the SwapAliasWithPrincipalName function on a daily basis (which is the loading frequency here) because here it recommends that a backup and a server restart should be done before and after, respectively, the function is executed (seems like it's a big deal).

Any suggestions would be gratefully appreciated.

Best regards,

Fausto
jstrygner
MVP
Posts: 195
Joined: Wed Jul 22, 2009 10:35 pm
OLAP Product: TM1
Version: 9.5.2 FP3
Excel Version: 2010

Re: How to change index in demension

Post by jstrygner »

I am affraid there is no way of simple changing indexes via TI, you will need workarounds.

I had a need of being able to re-set elements order based on source file.
The way I reached my goal was to have two separate processes:
1. First that performs deletion of all elements in Prolog and then in Metadata tab doing element inserts one by one in desired for index order.
2. Second performing attaching children under parents (there was a plenty of parallel hierarchies).

But there is a risk of performing deletion of elements on production environment (you will never be 100% sure if some day your source will just not surprise you with its content).
So I was always performing the task on development environment and after check promotng dimension to production - using Vizier tool in my case.

HTH
tomok
MVP
Posts: 2832
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: How to change index in demension

Post by tomok »

The only way I know of to guarantee absolute control over the index number of dimension elements is to do your maintenance via an XDI file.
Tom O'Kelley - Manager Finance Systems
American Tower
http://www.onlinecourtreservations.com/
Post Reply