COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: coghelp on 15 Dec 2010 10:37:37 PM

Title: Interesting and challenging question just check this out
Post by: coghelp on 15 Dec 2010 10:37:37 PM
Hello to all gurus ,

I have a requirement where in I need to find difference between two rows, its between Start Date of "Track ID 2 "- ENd Date of "Track ID" 1 i.e.  Dec 13, 2010 6:35:50 AM -Dec 13, 2010 6:35:50 AM =0. see below exp


Track ID           Start Date                                    End Date
1                     Dec 13, 2010 6:35:47 AM               Dec 13, 2010 6:35:50 AM
2                     Dec 13, 2010 6:35:50 AM               Dec 13, 2010 6:35:57 AM
3                     Dec 13, 2010 6:35:57 AM               Dec 13, 2010 6:38:19 AM
Title: Re: Interesting and challenging question just check this out
Post by: MFGF on 16 Dec 2010 03:38:34 AM
Hi,

You'd probably need two queries for this - each retrieving the data you show in your example, then join them based on [Query1].[trackID] = [Query2].[trackID - 1] (where TrackID - 1 is a query calculation in the second query).

You can then perform your calc to determine hte difference in the resulting query.

Regards,

MF.