Create Parent Child from N_Level Element.

Post Reply
AkashGautam
Posts: 5
Joined: Fri Jul 29, 2022 5:13 am
OLAP Product: IBM Planning Anaytics
Version: 10.1.1
Excel Version: 2206

Create Parent Child from N_Level Element.

Post by AkashGautam »

Akash please read the forum rules and guidelines and make sure you post in the right forum.

I have a Product Hierarchy for a Retail Industry. For Example.

Total_Product
BAGS
BAGS_SKY
1234_BAGS
1234_BAGS_500_Normal
1234_BAGS_399_Normal
1234_BAGS_299_Normal

Now the Bag was originally 500 Bucks ("1234_BAGS_500_Normal"). So we will Mark it as "Parent" and create an Alias "1234_BAGS_500_Normal_Original". Then Swap the Alias with the Principal Name without any loss of data. Now I have to create a Hierarchy out of it in different dimension such that.

Total_Product
BAGS
BAGS_SKY
1234_BAGS
1234_BAGS_500_Normal
1234_BAGS_500_Normal_Original
1234_BAGS_399_Normal
1234_BAGS_299_Normal.


I have completed till Swapping part. But the creation of hierarchy and Making the Swapped part as Parent is going difficult. I can get this as parent child.

1234_BAGS_500_Normal
1234_BAGS_500_Normal_Original.
But this remains out: 1234_BAGS_399_Normal
1234_BAGS_299_Normal.

So please help me with the TI code or rule to resolve this.
lotsaram
MVP
Posts: 3663
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Create Parent Child from N_Level Element.

Post by lotsaram »

What you are describing honestly makes no sense at all. In the real-world prices change all the time and in any sensibly designed system you do not change product code identifiers for a change in price. The same product may sell for different prices in different channels, or in the same channel in different weeks, but it is still one SKU. The price is nothing more than the revenue per unit which is a measure, KPI or property depending on how you like to call it.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
AkashGautam
Posts: 5
Joined: Fri Jul 29, 2022 5:13 am
OLAP Product: IBM Planning Anaytics
Version: 10.1.1
Excel Version: 2206

Re: Create Parent Child from N_Level Element.

Post by AkashGautam »

lotsaram wrote: Fri May 03, 2024 1:08 pm What you are describing honestly makes no sense at all. In the real-world prices change all the time and in any sensibly designed system you do not change product code identifiers for a change in price. The same product may sell for different prices in different channels, or in the same channel in different weeks, but it is still one SKU. The price is nothing more than the revenue per unit which is a measure, KPI or property depending on how you like to call it.
Let's keep it easy and simple.

1234(Consolidation)
....1234_A(Child)
....1234_B(Child)
....1234_C(Child)

the above hierarchy has "Parent/Child" text attribute in which user will define who is parent and who is child. For example:
"1234_A" is Parent then the hierarchy should become.

1234(Consolidation)
.....1234_A(Consolidation)
...........1234_A_Original(Child)
...........1234_B(Child)
...........1234_C(Child)
lotsaram
MVP
Posts: 3663
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Create Parent Child from N_Level Element.

Post by lotsaram »

You are going about this all wrong. Just accept that a element type in TM1 once defined is immutable. However, *news flash* it doesn't matter since you also have aliases.

In your hypothetical scenario there is no need to do anything to "1234_A". The element doesn't need to be recreated, there doesn't need to be any SwapAliasWithPrincipalName, there doesn't need to be any copying of data.

Simply
  1. Remove the alias from 1234_A
  2. Create a new consolidation for 1234_A (e.g. "1234_A_Consol")
  3. Assign 1234_A as a child to the new consolidation
  4. Loop all remaining parents of 1234_A and remove 1234_A as a child and add the new consolidation as a child
  5. Assign the original alias value(s) of 1234_A to the new consolidation
  6. Assign new alias value(s) to 1234_A (e.g. "1234_A original")
Working with the tool rather than against the tool is easier.
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
Post Reply