COGNOiSe.com - The IBM Cognos Community

IBM Cognos 8 Platform => COGNOS 8 => Report Studio => Topic started by: klb on 21 Aug 2010 09:07:46 AM

Title: Handling Timestamps
Post by: klb on 21 Aug 2010 09:07:46 AM
Hello,

I'm trying to analyse data from ARS Remedy.

Some of the data are timestamps matching a status. E.g. 'assigned' or 'work in progress'. 

Sometimes a status appears double or triple per ticket.
e.g.:
assigned                  01.01.2010 10:00:00
work in progress      01.01.2010 11:00:00
assigned                  02.01.2010 06:00:00
solved                      02.01.2010 07:00:00
and so on.

I created two queries. One selecting ticketId, and timestamps 'assigned' and one containing ticketId and timestamps 'work in progress'.
A third query joins the output of both queries and calculates the difference between those two timestamps.

Unfortunatly the output of that example above would be:
assigned                         work in progress              Difference
01.02.2010 06:00:00      01.01.2010 11:00:00       - 19 hrs

It should be:
assigned                          work in progress             Difference
01.01.2010 10:00:00       01.01.2010 11:00:00      1 hrs

Is it possible handle only the first appearance of a status?

Thanks!