COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Framework Manager => Topic started by: madhancog on 08 Jun 2010 08:09:43 AM

Title: Need Realtive Time dimension in DMR
Post by: madhancog on 08 Jun 2010 08:09:43 AM
Hi Gurus,
  I am in need to get Rolling 12 months,Last 12 months,Last Quarter,current Quarter,Last YTD,upto Last full month in DMR model can i know how can i achieve this.

Thanks in advance
K.m
Title: Re: Need Realtive Time dimension in DMR
Post by: blom0344 on 09 Jun 2010 07:33:39 AM
AFAIK there are 2 approaches:

1. Create a table or view that stores the relative time information and is synchronized each night (either by ETL or by through the view definition)
(relative time demands refering to the systemdate, which makes an indexed view impossible)

2. Create seperate query subjects that store (through the query subjects filter) those date keys that relate to the portion of date/time that you need.
Join these query subjects to the fact.
Since you can only use one relative time dimension at a time this means different slices out of the fact through the join.

Next 2 year would be like:


extract(year,[time].[date]) between (extract(year,current_date)+1 and extract(year,current_date)+2)

Title: Re: Need Realtive Time dimension in DMR
Post by: cognosjon on 15 Jun 2010 01:57:10 AM
Morning,
I used many years ago a document by Cognos Titled "Modeling Relative Time as Measures"

Its an old document but it may have some benefit for you.

http://www.ibm.com/developerworks/data/library/cognos/page90.html (http://www.ibm.com/developerworks/data/library/cognos/page90.html)