COGNOiSe.com - The IBM Cognos Community

IBM Cognos 10 Platform => Cognos 10 BI => Report Studio => Topic started by: annadanna on 07 Aug 2013 03:00:22 PM

Title: Add flag to day before and after current flag (on different rows)
Post by: annadanna on 07 Aug 2013 03:00:22 PM
Hi,

I have the following objects:

Date
Holiday Flag

I'd like to add two more objects:

Day Before Holiday Flag
Day After Holiday Flag

These flags would tied to their corresponding dates and should look like:

Date                       Holiday Flag     Day Before Flag     Day After Flag
7/2/2013               
7/3/2013                                       Y
7/4/2013                Y
7/5/2013                                                                   Y

Any idea how to write this into the query expression?

Thanks for any help you can offer!
Title: Re: Add flag to day before and after current flag (on different rows)
Post by: annadanna on 07 Aug 2013 04:08:26 PM
I solved this one myself by adding two additional queries and joining everything together on date. One query was the day before and the other was the day after.