Search code examples
iccube

Table for hierachy in icCube


In icCube the table is an attribute of the dimension not of the hierarchy. This means that you cannot have two hierarchies defined on different tables.

How would you put in a single dimension the two following tables ?

Table monthly: date year quarter month_nr month day 1997-01-01 1997 Q1 1 January 1 1997-01-02 1997 Q1 1 January 2 1997-01-03 1997 Q1 1 January 3 1997-01-04 1997 Q1 1 January 4 1997-01-05 1997 Q1 1 January 5 Table weekly: date year week_nr day day_nr 1997-01-01 1997 2 Wednesday 3 1997-01-02 1997 2 Thursday 4 1997-01-03 1997 2 Friday 5 1997-01-04 1997 2 Saturday 6 1997-01-05 1997 3 Sunday 7


Solution

  • You've to use a join to merge both table so the final table looks like :

    Table monthly: date year quarter month_nr month month_day week_nr day day_nr 1997-01-01 1997 Q1 1 January 1 2 Wednesday 3 1997-01-02 1997 Q1 1 January 2 2 Thursday 4 1997-01-03 1997 Q1 1 January 3 2 Friday 5 1997-01-04 1997 Q1 1 January 4 2 Saturday 6 1997-01-05 1997 Q1 1 January 5 3 Sunday 7

    If you can't make a join on the database, feel free to check this other stackoverflow question Or use a table wizard dimension that can create this kind of structures automatically.