COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Dynamic Cubes => Topic started by: Dineshpullagura on 17 Sep 2015 09:20:47 AM

Title: Deisgn of Date Dimension Table
Post by: Dineshpullagura on 17 Sep 2015 09:20:47 AM
Hello All,

In my data model i have a transaction fact and a bunch of aggregate facts at month level. I am trying to model a date dimension which can be used for both transaction and aggregate fact.

I have a format like this..

Date_ID     Date         Month_Row Month    Month_Name   Year_Row   Year
  1        09/16/2015     0                 9      September               0          2015
  2        09/17/2015     0                 9      September               0          2015
  3                              1                 9      September               0          2015
  4                                                                                       1           2015 


The Month_Row as '1' identifies that the entry is for a month and Year_Row as '1' identifies it as year and it can be used for month and year aggregates respectively.

Can we model the date dimension in cube designer, with the dimension table in this format. Or is there any other way to model the date dimension table.

Thanks for your time.

Title: Re: Deisgn of Date Dimension Table
Post by: MFGF on 17 Sep 2015 10:41:24 AM
Quote from: Dineshpullagura on 17 Sep 2015 09:20:47 AM
Hello All,

In my data model i have a transaction fact and a bunch of aggregate facts at month level. I am trying to model a date dimension which can be used for both transaction and aggregate fact.

I have a format like this..

Date_ID     Date         Month_Row Month    Month_Name   Year_Row   Year
  1        09/16/2015     0                 9      September               0          2015
  2        09/17/2015     0                 9      September               0          2015
  3                              1                 9      September               0          2015
  4                                                                                       1           2015 


The Month_Row as '1' identifies that the entry is for a month and Year_Row as '1' identifies it as year and it can be used for month and year aggregates respectively.

Can we model the date dimension in cube designer, with the dimension table in this format. Or is there any other way to model the date dimension table.

Thanks for your time.

Hi,

To make life easy for yourself, think of the data in terms of a hierarchy. Each member in the hierarchy will need a uniquely defined ID (business key). As I see it you will end up with four distinct levels:

Cheers!

MF.
Title: Re: Deisgn of Date Dimension Table
Post by: bus_pass_man on 17 Sep 2015 07:06:26 PM
Try looking at the sample model for pointers about modeling for multi-grain and aggregates.   The Redbook has material too.   All 3 modeling chapters would be useful I think.  The other chapters on aggregates would be handy.

In addition to the sections on multi-fact multi-grain and aggregates, you might want to read the seconds on levels.  You need keys to uniquely identify members in a hierarchy.  You don't need to create expressions concatenating columns, you can add multiple columns in the level unique key editor ( the top button on the right of the level editor. )  The retailer name level in the retailers dimension in the sample model has an example of that.

In general, you want to have keys which are integers, which the data base can do stuff faster ( sorry for the overly technical language) than non-integers. If you don't have the luxury of getting your ETL to do that then you need to settle for what you can but you need to understand this aspect of your data warehouse design and the implications in terms of performance.

I'm interested in learning about why you have records which seem to exist just to be month or year records.  Are you omitting keys for those entities which join your time table to fact tables at those grains?

If you're using month-row etc. as part of your keys those nulls could be a problem.