COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => BI Modeling (Transformer) => Topic started by: singhd on 01 Sep 2010 12:56:22 AM

Title: Levels and Hierarchy
Post by: singhd on 01 Sep 2010 12:56:22 AM
Was wondering if someone could help me with the below

I have a hierarchy where 2 levels reside in 2 different dimension tables. They don't have any direct join, which means that we would need to go through a fact in the data source query. I was wondering if it is a common approach. I have always tried to have the whole hierarchy in a single table.

Secondly, i have a scenario where i have 2 columns, Type and Description.

Type    Description

Country  US
State     CA
City       SD

My hierarchy has to be Country->State->City. Was wondering how i could set it up in transformer. Ideally i would have wanted 3 columns in the database, one for each level instead of a type field used to distinguish between them.
Title: Re: Levels and Hierarchy
Post by: singhd on 01 Sep 2010 12:46:55 PM
Could someone please help
Title: Re: Levels and Hierarchy
Post by: redmist on 01 Sep 2010 04:50:52 PM
You could create a sinlge query subject combining the Fact and the 2 Dimensions and build Dimensions off it.It is ok to go through the Fact if there is no other option. The drawback would be that the cube build performance would take a hit.
Could you clarify your second question?
Title: Re: Levels and Hierarchy
Post by: bloggerman on 01 Sep 2010 11:09:31 PM
Also, there might be a chance of missing some data since it is fact dependent.
Title: Re: Levels and Hierarchy
Post by: singhd on 08 Sep 2010 12:41:30 PM
On the second question above, normally, when we are to set up levels in transformer, we pull each level from different column in the data source. For e.g., if our hierarchy has Country, State and City we would have separate columns for each in the database. 

In my scenario, instead of having each in a separate column, i have the data available through 2 columns, one type and other its description.

I was thinking if its worth creating a report that would have a column for each level and use it in the transformer. And, if anyone has come across something like this?



Title: Re: Levels and Hierarchy
Post by: nmcdermaid on 03 Oct 2010 09:45:42 PM
You would have to have another column in your Country/State/City table which correlates a city with something in your fact.

Is it City?

In this case you simply write a query to transform that table into something useful: