Can't change from N to C in PA with hierarchy enabled?

Post Reply
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Can't change from N to C in PA with hierarchy enabled?

Post by macsir »

Hi, so for a dimension with hierarchy enabled in PA, if I want to change 'N' element "XXX" to 'C' element by adding a child under that element in a hierarchy, it won't allow as it is a leaf in 'Leaves' hierarchy already. It pops with the following error,
Insertion of element "XXX" into hierarchy "YYY" failed because the leaf already exists in the dimension and is of a different leaf type.
If the hierarchy is not enabled and is a traditional dimension, then it is fine.
Is there a easy way to change the element type rather than deleting 'N' first and adding 'C' later? Thanks.
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
lotsaram
MVP
Posts: 3703
Joined: Fri Mar 13, 2009 11:14 am
OLAP Product: TableManager1
Version: PA 2.0.x
Excel Version: Office 365
Location: Switzerland

Re: Can't change from N to C in PA with hierarchy enabled?

Post by lotsaram »

Basically no.

This is a well known, well discussed issue with enabling hierarchies. It's not really an "issue" as such, we have just been historically lazy and sloppy with standard practice in many TM1 models to insert all elements with type 'N' and convert to 'C' by inserting children. This isn't possible with alternate hierarchies as all N elements are automatically inserted into the Leaves hierarchy and there can be no ID clash between a leaf and a C element in any hierarchy.

It just means that elements must be created up front with the correct type (which many would argue is what we should have been doing all along).
Please place all requests for help in a public thread. I will not answer PMs requesting assistance.
User avatar
macsir
MVP
Posts: 785
Joined: Wed May 30, 2012 6:50 am
OLAP Product: TM1
Version: PAL 2.0.9
Excel Version: Office 365
Contact:

Re: Can't change from N to C in PA with hierarchy enabled?

Post by macsir »

Hi, mate
Thanks. Yes, as long as the leaf is not used in other hierarchies other than the default and leaves hierarchies, it still can be converted from N to C automatically. I actually might find a bug while playing with this when using DIRECT version of dimension functions. i.e. DIMENSIONELEMENTINSERTDIRECT or DIMENSIONELEMENTCOMPONENTADDDIRECT etc. The Leave hierarchy will be out of sync somehow. The server version I am using is "TM1SERVER_version=TM1SERVER-AW64-ML-RTM-11.8.00000.33-0"
Here are the steps.
a.png
a.png (111.61 KiB) Viewed 1466 times
b.png
b.png (94.55 KiB) Viewed 1466 times
If you could share any opinion on it, it will be great. :)
In TM1,the answer is always yes though sometimes with a but....
http://tm1sir.blogspot.com.au/
Post Reply