Search code examples
iccube

IcCube - OLAP Time Dimension with range only linked on start date


In IcCube there is a Time Wizard with an option to index by range. I then can link this dimension to a fact table with a start field and an end field.

But unfortunately I have a fact table with only start dates and I would like to link them in that way, that the entry is valid, until I have another entry with the same keys. Would that be possible, or would I have to add the end date to every entry?


Solution

  • If I understood correctly, you've a fact table with the following structrue

     Dim1, DimTime, Amount
     1 , 1 Feb 2014, 2.4
     2 , 8 Feb 2014, 1.4     
     3 , 3 Feb 2014, 3.4
    

    You would like to bind the first line from the [1 Feb,3 Feb), the third line from [3 Feb, 8 Feb) and so on.

    If this is the case, there is no easy way. Ideally you calculate the to) part in your data source or you could use icCube's ETL layer to solve it there (Javascript with cache). Note the last is not a good approach for very large tables.

    If you can order by the Time column the algorithms would be a lot easier without the need to cache the whole table.

    You can find an schema example in this link using a Javascript view as described here.

    hope it helps