Hierarchy by TI

Post Reply
telula
Posts: 99
Joined: Tue Nov 18, 2008 5:40 am

Hierarchy by TI

Post by telula »

All,
I have a datasource that has ID,ProjectName,Manager,State
I want to build a hierarchy
+ProjectsByState
+ProjectsByManager

My Prolog is
DimensionElementInsert('Projects', '', 'CustomersBy_Manager', 'C');
DimensionElementInsert('Projects', '', 'CustomersBy_State', 'C');
My Metadata is
DimensionElementInsert('Projects','',State,'n');
DimensionElementInsert('Projects','',Manager,'n');
DimensionElementInsert('Projects','',ID,'n');

DimensionElementComponentAdd('Projects', 'ProjectsByStateState', State, 1);
DimensionElementComponentAdd('Projects', State, ID, 1);
DimensionElementComponentAdd('Projects', ProjectsByManager', Manager, 1);
DimensionElementComponentAdd('Projects', Manager, ID, 1);

But I am getting extra hierarchy
+ProjectsByState
+ProjectsByManager
+NSW
+ProjectManager1
+ProjectManager2
+QLD

etc...

Can anyone help?
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: Hierarchy by TI

Post by Alan Kirk »

telula wrote:All,
I have a datasource that has ID,ProjectName,Manager,State
I want to build a hierarchy
+ProjectsByState
+ProjectsByManager

My Prolog is
DimensionElementInsert('Projects', '', 'CustomersBy_Manager', 'C');
DimensionElementInsert('Projects', '', 'CustomersBy_State', 'C');
My Metadata is
DimensionElementInsert('Projects','',State,'n');
DimensionElementInsert('Projects','',Manager,'n');
DimensionElementInsert('Projects','',ID,'n');

DimensionElementComponentAdd('Projects', 'ProjectsByStateState', State, 1);
DimensionElementComponentAdd('Projects', State, ID, 1);
DimensionElementComponentAdd('Projects', ProjectsByManager', Manager, 1);
DimensionElementComponentAdd('Projects', Manager, ID, 1);

But I am getting extra hierarchy
+ProjectsByState
+ProjectsByManager
+NSW
+ProjectManager1
+ProjectManager2
+QLD

etc...

Can anyone help?
For one thing the consolidation names that you're creating in the Prolog don't seem to bear any resemblance to the names that you're using in the Metadata. For another I doubt that the intended name of the by state consolidation is "ProjectsByStateState"

In other words, I'm not sure that the consolidations that you're trying to add the State and Manager elements to actually exist. If they don't, it would make sense that you're getting State and Manager consolidations showing as their own hierarchies. I can't recall off the top of my head whether the absence of the intended parent will spit an error into the log, or whether TI will just ignore the statement.
"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.
telula
Posts: 99
Joined: Tue Nov 18, 2008 5:40 am

Re: Hierarchy by TI

Post by telula »

Sorry, the Prolog is
DimensionElementInsert('Projects', '', 'ProjectsByManager', 'C');
DimensionElementInsert('Projects', '', 'ProjectsByState', 'C');

I did get the correct hierarchy except I have these additional consolidations.
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: Hierarchy by TI

Post by Alan Kirk »

telula wrote:Sorry, the Prolog is
DimensionElementInsert('Projects', '', 'ProjectsByManager', 'C');
DimensionElementInsert('Projects', '', 'ProjectsByState', 'C');
Still doesn't match with the consolidation name that you're using in Metadata; "ProjectsByStateState". You have the word State in the name twice.
"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.
telula
Posts: 99
Joined: Tue Nov 18, 2008 5:40 am

Re: Hierarchy by TI

Post by telula »

sorry, the error was copying and pasting into this forum.Start-over.

Prolog
DimensionElementInsert('Customers', '', 'ClientsByState', 'C');
Metadata
DimensionElementInsert('Customers','',State,'n');
DimensionElementInsert('Customers','',ID,'n');
DimensionElementComponentAdd('Customers', 'ClientsByState', State, 1);
DimensionElementComponentAdd('Customers', State, ID, 1);

The above works.
I want to build a second hierarchy using the manager as the consolidated element.
When I add the lines below is when I get repetition of the second level consolidated element.

Prolog
DimensionElementInsert('Customers', '', 'ClientsByState', 'C');
DimensionElementInsert('Customers', '', 'ClientsByManager', 'C');

Metadata
DimensionElementInsert('Customers','',State,'n');
DimensionElementInsert('Customers','',ID,'n');
DimensionElementComponentAdd('Customers', 'ClientsByState', State, 1);
DimensionElementComponentAdd('Customers', State, ID, 1);

DimensionElementInsert('Customers','',Manager,'n');
DimensionElementComponentAdd('Customers', 'ClientsByManager', State, 1);
DimensionElementComponentAdd('Customers', Manager, ID, 1);
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: Hierarchy by TI

Post by Alan Kirk »

telula wrote:sorry, the error was copying and pasting into this forum.Start-over.

Prolog
DimensionElementInsert('Customers', '', 'ClientsByState', 'C');
Metadata
DimensionElementInsert('Customers','',State,'n');
DimensionElementInsert('Customers','',ID,'n');
DimensionElementComponentAdd('Customers', 'ClientsByState', State, 1);
DimensionElementComponentAdd('Customers', State, ID, 1);

The above works.
I want to build a second hierarchy using the manager as the consolidated element.
When I add the lines below is when I get repetition of the second level consolidated element.

Prolog
DimensionElementInsert('Customers', '', 'ClientsByState', 'C');
DimensionElementInsert('Customers', '', 'ClientsByManager', 'C');

Metadata
DimensionElementInsert('Customers','',State,'n');
DimensionElementInsert('Customers','',ID,'n');
DimensionElementComponentAdd('Customers', 'ClientsByState', State, 1);
DimensionElementComponentAdd('Customers', State, ID, 1);

DimensionElementInsert('Customers','',Manager,'n');
DimensionElementComponentAdd('Customers', 'ClientsByManager', State, 1);
DimensionElementComponentAdd('Customers', Manager, ID, 1);
Shouldn't

Code: Select all

DimensionElementComponentAdd('Customers', 'ClientsByManager', State, 1);
be

Code: Select all

DimensionElementComponentAdd('Customers', 'ClientsByManager', Manager, 1);
?
"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.
telula
Posts: 99
Joined: Tue Nov 18, 2008 5:40 am

Re: Hierarchy by TI

Post by telula »

Yes sorry...bad day...
telula
Posts: 99
Joined: Tue Nov 18, 2008 5:40 am

Re: Hierarchy by TI

Post by telula »

Its ok.I got it to build using 2 TI processes...
Post Reply