Page 1 of 1
NewBee Dimension Building from TI Process Issue
Posted: Fri Jun 08, 2012 8:41 pm
by FarmboyEsq
Hello,
I'm trying to build a very simple dimension from a TI process. I've documented everything in the attached PDF. Can anyone help me understand why my resulting dimension looks so hosed in the dimension editor?
Thank you!
Re: NewBee Dimension Building from TI Process Issue
Posted: Fri Jun 08, 2012 10:33 pm
by FarmboyEsq
By the way, I'm using Cognos version 9.52 from a Windows 7, 64-bit desktop machine
In studying this further, I noticed that the "Consolidated_Core" value was not consistent accross all 6 rows. It was:
Consolidated Core
Consolidated Core
Consolidated Core
Consolidated
Consolidated
Consolidated
I've rebuilt the whole thing from scractch to remove the word "consolidated" -- too confusing. I'm now using the term "combined".
Unfortunately, I now can't even get the process run without errors. I'm attaching version 2! (Btw, I'm not sure why I can't open the attachment from the TM1 forum - it makes me save it on my local file system first. Perhaps it's my browser...)
Thanks again for any help.
Re: NewBee Dimension Building from TI Process Issue
Posted: Fri Jun 08, 2012 11:21 pm
by PlanningDev
Where it says Element Type on your dimension tab it says "String". Your core ID is currently numeric. You either need to change that element type to numeric or change your variable to string.
Re: NewBee Dimension Building from TI Process Issue
Posted: Mon Jun 11, 2012 1:54 pm
by FarmboyEsq
Thank you for the reply. I made this change this morning and did get a successful completion of the TI process without errors.
Unfortunately, the resulting dimension is still hosed. I think I may have "ordering" issues.
I'm attaching the latest version. Any insights would be greatly appreciated.
Thank you.
Stg
Re: NewBee Dimension Building from TI Process Issue
Posted: Mon Jun 11, 2012 2:22 pm
by declanr
As to the ordering issue; your best bet would probably be to avoid the wizard and then you will have more flexibility as to what you put where.
Look through the Dimension Manipulation part of the TM1 Reference Guide.
As to the Alias issue you will need to create 1 variable as opposed to 3; you can do this yourself in the data tab if you go through the method of not using the wizard. If you do use the wizard you can create an extra variable and use the function box to decide which one of the other variables gets used for it.
e.g. if desc1 and desc2 are empty but desc3 isn't then vdesc = desc3
Re: NewBee Dimension Building from TI Process Issue
Posted: Mon Jun 11, 2012 7:23 pm
by Duncan P
Hi Stg,
To get the sort order correct you need to use the appropriate buttons on the
Dimensions and
Consolidations tabs.

- Dimensions tab
- hier_dim_tab.png (10.27 KiB) Viewed 8882 times
and

- Consolidations tab
- hier_cons_tab.png (12.22 KiB) Viewed 8882 times
To get a single attribute for the three caption columns you need to use the same attribute name for each and specify to which level of element it applies, as in the following example.

- Attributes tab
- hier_attr_tab.png (12.39 KiB) Viewed 8882 times
HTH
Re: NewBee Dimension Building from TI Process Issue
Posted: Mon Jun 11, 2012 8:41 pm
by FarmboyEsq
Thank you very much for the replies.
Changing the Element Order on the Maps/Dimensions tab to "By Hierarchy" and the Component Order on the Maps/Consolidations tab to "Automatic/Name/Ascending" does give me the results I wanted!

- Correct Dimension Structure.PNG (3.35 KiB) Viewed 8875 times
I'm still trying to digest what it means to avoid "the wizard." I guess that means embellishing the TI scripts on the advanced tab? I do have the manual(s) open and see the many functions available.
I'm also still digesting the "single attribute/three caption columns" concept described by Duncan P.
I was a bit surprised to see at least one iteration of my attempts created a dimension where the same element appeared in multiple places. I thought it could appear once and only once, at least in the basic Dimension.

- Hosed Dimension Structure.PNG (4.41 KiB) Viewed 8875 times
Also, the difference between an "Element" and "Element Variable" is confusing to me.
I'll keep reading....
Thanks again.
Re: NewBee Dimension Building from TI Process Issue
Posted: Mon Jun 11, 2012 10:35 pm
by tomok
FarmboyEsq wrote:I was a bit surprised to see at least one iteration of my attempts created a dimension where the same element appeared in multiple places. I thought it could appear once and only once, at least in the basic Dimension.
An element can exist in multiple hierarchies inside a single dimension. When they say an element can only exist once in a single dimension they mean you can't have two elements with the same name. For example, in a Year dimension you can only have the element "January" once. January can roll up to multiple parents, like 1st Quarter, or January - YTD, but you can only have one January.
Re: NewBee Dimension Building from TI Process Issue
Posted: Tue Jun 12, 2012 9:03 am
by Duncan P
FarmboyEsq wrote:
I'm also still digesting the "single attribute/three caption columns" concept described by Duncan P.
FarmboyEsq wrote:
Also, the difference between an "Element" and "Element Variable" is confusing to me.
On the attributes tab the "Element Variable" field lets you choose one of the columns from the variables tab. If that variable is used to provide the item name then the corresponding "Attribute Variable" will provide the value for the attribute specified.
Why not try it out and have a look in the generated code in the Data section of the Advanced tab. For the example from which I captured the screenshot I got the following :-
Code: Select all
#****Begin: Generated Statements***
ATTRPUTS(L1a,'l3hier',L1,'caption');
ATTRPUTS(L2a,'l3hier',L2,'caption');
ATTRPUTS(L3a,'l3hier',L3,'caption');
#****End: Generated Statements****
You can see that it is using the correct L*a column for the "caption" attribute of the corresponding item L* as specified on the attributes tab.
On the subject of using the wizard or not, I think Declan was saying there may come a time when what the wizard can produce is not enough for you. That's not the case here but when it does happen you can choose "Other" against all of the variables in the Variables tab and then just write your own code in the Advanced section.

- Variables tab
- hier_vars_tab.png (18.65 KiB) Viewed 8847 times
Each of the variables in the variables section will be available in the Metadata and Data sections. The process runs the code in the Prolog section once. Then it runs the code for the Metadata section once for each row in the source. Then it runs the code in the Data section once for each row and finally it runs the code in the Epilog section once. Typically you would set stuff up in the Prolog, create dimension elements in the Metadata section, add data to cubes (including attributes) in the Data section and then clean up in the Epilog. Dimension elements that you insert in the Metadata section are not available to add data against until the Data section.
I found that the best way to get started writing my own TI was to use the wizard, then copy the code out of the generated sections and place it below. Then I would change the variables to "Other" (which clears out the generated sections) and then go back to modify the code to do what I wanted. After a while you will just go straight in and write the code.
Good luck and have fun.
Re: NewBee Dimension Building from TI Process Issue
Posted: Tue Jun 12, 2012 4:08 pm
by FarmboyEsq
Great information -- thank you!
This covered all of the issues I'd raised -- I'm impressed! As suggested, I'll need to try out a few combinations of things to help it sink in.
Here's the next thing I noticed though, relative to my alias attributes, which I think are loaded correctly. I seem to be unable to get the alias to display at all levels simulataneously in the Dimension viewer (Subset editor).

- Combined Alias.PNG (28.2 KiB) Viewed 8828 times

- Revenue Expense Alias.PNG (27.53 KiB) Viewed 8828 times

- Core Section Alias.PNG (29.96 KiB) Viewed 8828 times
I'm sure I'm missing something here, because the notion of using alias to support an alternate language, would (i think) mean the entire dimension would appear in that alternate language. Is this the type of question that I should start a separate thread for?
Thanks again!
Stg
Re: NewBee Dimension Building from TI Process Issue
Posted: Tue Jun 12, 2012 6:18 pm
by Michel Zijlema
Hi,
You've set up an alias per level in the hierarchy in the dimension. And as you noticed, you can display only one alias at the time.
What you need to do is create one alias (f.i. 'Description') and load the attribute values for each level on this single alias. After this you can select the alias and you will see the required descriptions on every level.
Michel
Re: NewBee Dimension Building from TI Process Issue
Posted: Wed Jun 13, 2012 4:59 pm
by FarmboyEsq
Thank you -- this worked!
It struck me as I left work yesterday, that the "Attribute" property (concept? category?) of the Maps/Attributes tab has the potential to transcend multiple elements (levels) in the dimension.
I was thinking of it being only relevant to a specific level and not to the larger dimension. I've connected the three elements to a "Level" attribute, and am now seeing what'd I'd hoped to see.

- Core Dimension Levels.PNG (30.38 KiB) Viewed 8803 times
Thanks for the good guidance!
Stg