Page 1 of 1

Hierarchy by TI

Posted: Tue Sep 07, 2010 4:38 am
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?

Re: Hierarchy by TI

Posted: Tue Sep 07, 2010 4:50 am
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.

Re: Hierarchy by TI

Posted: Tue Sep 07, 2010 4:58 am
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.

Re: Hierarchy by TI

Posted: Tue Sep 07, 2010 5:03 am
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.

Re: Hierarchy by TI

Posted: Tue Sep 07, 2010 5:28 am
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);

Re: Hierarchy by TI

Posted: Tue Sep 07, 2010 5:40 am
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);
?

Re: Hierarchy by TI

Posted: Tue Sep 07, 2010 5:49 am
by telula
Yes sorry...bad day...

Re: Hierarchy by TI

Posted: Tue Sep 07, 2010 5:55 am
by telula
Its ok.I got it to build using 2 TI processes...