Do not input private or sensitive data. View Qlik Privacy & Cookie Policy.
Skip to main content

Announcements
AWS Degraded - You may experience Community slowness, timeouts, or trouble accessing: LATEST HERE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to calculate days in between dates in straight table? urgent help please


Hi,

I have data as below. I need to calculate days between highlighted dates. please can anyone suggest me how to do this?

the condition is when STAGE2 =CC and STAGE2=MR then need to calculate days between DATE 28/01/2015 12:00 and 01/04/2015 18:28                                                                                                 

IDSTAGE1STAGE2DATE
43998CMAP18/05/2015 15:32
43998PDCM24/04/2015 14:24
43998DTDPD08/04/2015 14:11
43998MRC08/04/2015 14:10
43998DMR01/04/2015 18:28
43998DAD01/04/2015 18:01
43998REDA28/03/2015 17:14
43998RARE28/03/2015 16:38
43998CPRA13/03/2015 16:49
43998CSCP27/02/2015 13:30
43998QRCS27/02/2015 13:29
43998ELQR27/02/2015 13:28
43998TAEL11/02/2015 14:51
43998CCTA11/02/2015 14:51
43998CCCC28/01/2015 13:30
43998LGCC28/01/2015 12:00

Thanks.

23 Replies
anlonghi2
Creator II
Creator II

Amelia,

look at the attached doc.

Andrea

Not applicable
Author

Thanks. for some IDs there is only time movement to 'MR' STGAE2 but for some IDs there are multiple times movement to 'MR' STGAE2. what I mean is below ID have multiple movements.

                                                                                                       


 

 
ID
STAGE1STAGE2DATE
45435CMAP18/05/2015 15:32
45435PDCM24/04/2015 14:24
45435DTDPD08/04/2015 14:11
45435MRC08/04/2015 14:10
45435DMR05/06/2015 18:28
45435DAD01/04/2015 18:01
45435REDA28/03/2015 17:14
45435RARE28/03/2015 16:38
45435MRRA13/03/2015 16:49
45435CSMR27/02/2015 13:30
45435QRCS27/02/2015 13:29
45435MRQR27/02/2015 13:28
45435TAMR11/02/2015 14:51
45435CCTA11/02/2015 14:51
45435CCCC28/01/2015 13:30
45435LGCC28/01/2015 12:00
 
 

for these ID I need to calculate calculate days between DATE 28/01/2015 12:00 and 05/06/2015 18:28  . means need to consider latest STAGE2 date for MR          

how to do this . would it be possible? Please help

Not applicable
Author

please can help

anlonghi2
Creator II
Creator II

It's possible, please look at what I did to identify min date between multiple CC.

Regards

Andrea