COGNOiSe.com - The IBM Cognos Community

Legacy Business Intelligence => COGNOS ReportNet => Report Studio => Topic started by: nayitian on 19 Sep 2007 09:37:49 PM

Title: Date Prompt of Week
Post by: nayitian on 19 Sep 2007 09:37:49 PM
Hi All,

I am having a RS report which runs against a fact table has 10 years history. The fact table is like:

WK_CODE     REGION      SALES_TOTAL
200301           A               10
...
200712           B               20

It should let user select certain week. How can I set a Calendar Date Prompt and week parameter and link them together?

Thank you.
Title: Re: Date Prompt of Week
Post by: COGNOiSe administrator on 20 Sep 2007 09:28:09 AM
You probably have a lookup table somewhere in your DW that would allow you to tie dates to weeks. If not, use the date to week number function and add it to year. In pseudo code:


WeekcodeColumn = year(?parDate?) *100 + week_number(?parDate?)