CreateHierarchyByAttribute Issue

Post Reply
MarenC
Regular Participant
Posts: 449
Joined: Sat Jun 08, 2019 9:55 am
OLAP Product: Planning Analytics
Version: Planning Analytics 2.0
Excel Version: Excel 2016

CreateHierarchyByAttribute Issue

Post by MarenC »

Hi,

I am trying to use the CreateHierarchyByAttribute function in Planning Analytics and am receiving the following error:
Error: Prolog procedure line (22): DIMENSIONHIERARCHYCREATE: Cannot create hierarchy "Code Region": dimension "Code" already has element names/aliases containing metacharacters.
The code is:

Code: Select all

sCodeDim = 'Code';
sCodeAttr = 'Code Region';
sTotal = 'Total Regions';
sDefault = 'Region Undefined';

IF( HierarchyExists( sCodeDim, sCodeAttr) =1);
	HierarchyDestroy( sCodeDim, sCodeAttr);
ENDIF;

CreateHierarchyByAttribute( sCodeDim, sCodeAttr, sDefault, sTotal);
Has anyone encountered this issue? Given the error message I assumed that some characters are not allowed in hierarchies, which was a surprise to me, given they are ok in the main hierarchy. I should stress it appears it is the element names and not the alias causing the issue.

As a test I deleted most of the elements from the dimension bar a few and ran the process again, and it ran successfully.

I then decided to delete the new hierarchy I had created by running: HierarchyDestroy( sCodeDim, sCodeAttr);

Then when I went to update the Code dimension I got the following error:
Error: MetaData procedure line (0): Serious system error, Dimension not updated
It would appear that by destroying the hierarchy it had corrupted the dimension.

Has anyone encountered this issue?

Maren
Post Reply