Code for duplicate elements

Post Reply
Mems
Posts: 58
Joined: Thu Apr 14, 2011 12:27 pm
OLAP Product: TM1
Version: v10.2.2
Excel Version: 2010
Location: South Africa

Code for duplicate elements

Post by Mems »

Hey all,

I was wondering if someone has worked on a TI code to export multiply mapped elements to a .csv file.

Thanks,
MEMS
Alan Kirk
Site Admin
Posts: 6667
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: Code for duplicate elements

Post by Alan Kirk »

Mems wrote:I was wondering if someone has worked on a TI code to export multiply mapped elements to a .csv file.
Would you care to elaborate on what you mean by "multiply mapped elements"? (With full details of the cube, etc.)
"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.
Mems
Posts: 58
Joined: Thu Apr 14, 2011 12:27 pm
OLAP Product: TM1
Version: v10.2.2
Excel Version: 2010
Location: South Africa

Re: Code for duplicate elements

Post by Mems »

Apologies,

I have a Cost Pool dimension with 8 levels of data. The dimension is reshuffled each year. I want to make sure that one cost pool element is not mapped under two different levels creating a double count.

Each year this takes me days to complete and I was hoping somebody could help me verify which elements are under multiple roll ups.

Thanks
MEMS
asutcliffe
Regular Participant
Posts: 164
Joined: Tue May 04, 2010 10:49 am
OLAP Product: Cognos TM1
Version: 9.4.1 - 10.1
Excel Version: 2003 and 2007

Re: Code for duplicate elements

Post by asutcliffe »

Mems wrote:I have a Cost Pool dimension with 8 levels of data. The dimension is reshuffled each year. I want to make sure that one cost pool element is not mapped under two different levels creating a double count.
I'm making a few assumptions, but if you want to remove the old parent child relationship when an element moves from one branch of a hierachy to another, have a look at the "unwind" TI processes from Bedrock - Bedrock.Dim.Hierarchy.Unwind.All and Bedrock.Dim.Hierarchy.Unwind.Consolidation.

http://bedrocktm1.org/documentation.php

You'll want to run one of these as appropriate before you rebuild your hierarchy.
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: Code for duplicate elements

Post by Andy Key »

If you can't unwind the hiearachy and rebuild it from scrath, here's two simple ideas:

Run a TI with the dimension as the data source, look at ElParN for each element on the Data tab. You can combine this with an ElIsAnc if you have multiple valid hierarchies. If ElParN is > 1 then AsciiOutput

or

Have an Excel workbook where cell A1 is =DimNm( "Server:Dimension",Row()), cell B1 is =ElParN( "Server:Dimension", A1) copy both cells down for however many elements you have in your dimension, put autofilter on and look to see if you have any values in column B that are greater than 1.
Andy Key
Post Reply