COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: teresa.danna@gmail.com on 02 Jul 2015 02:02:08 PM

Title: RESOLVED - Report Studio Date Loop
Post by: teresa.danna@gmail.com on 02 Jul 2015 02:02:08 PM
I have the following objects:
Project Code
Period of Performance Start Date
Period of Performance End Date

I'd like to create a Crosstab where the vertical is a list of dates that gradually increase by a set amount, for example:
Column 1 Header = 7/1/15
Column 2 Header = 7/1/15 + 1 day (IE _add_days(7/1/15,1))
etc
etc
this would occur based on a user's parameter range

The end result would then be similar to the attached if the user had chosen 9/3 - 10/13/14 which determines if the Period of Performance for that project includes the date in the header or
Project Code |  Date  |  Date+1  |  Date+2 ....
Proj 1             TRUE     TRUE        FALSE
Proj 2             FALSE     TRUE        FALSE
Proj 3             TRUE     TRUE        TRUE

I use a relational datasource with SQL Server.
Title: Re: Report Studio Date Loop
Post by: CognosAnalytics on 02 Jul 2015 02:15:58 PM
Hello Tess,
You will need a date dimension with all the dates in it. This date dimension would do an OUTER join to the Period of Performance Date in your Project Fact. OUTER join will ensure that the date shows up on the columns regardless of a project having that date in the fact. Your prompt would then filter the dates on the date dimension.

-Cognos810
Title: Re: Report Studio Date Loop
Post by: teresa.danna@gmail.com on 02 Jul 2015 02:43:42 PM
Of course! Thank you!