Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
ID | STAGE1 | STAGE2 | DATE |
43998 | CM | AP | 18/05/2015 15:32 |
43998 | PD | CM | 24/04/2015 14:24 |
43998 | DTD | PD | 08/04/2015 14:11 |
43998 | MR | C | 08/04/2015 14:10 |
43998 | D | MR | 01/04/2015 18:28 |
43998 | DA | D | 01/04/2015 18:01 |
43998 | RE | DA | 28/03/2015 17:14 |
43998 | RA | RE | 28/03/2015 16:38 |
43998 | CP | RA | 13/03/2015 16:49 |
43998 | CS | CP | 27/02/2015 13:30 |
43998 | QR | CS | 27/02/2015 13:29 |
43998 | EL | QR | 27/02/2015 13:28 |
43998 | TA | EL | 11/02/2015 14:51 |
43998 | CC | TA | 11/02/2015 14:51 |
43998 | CC | CC | 28/01/2015 13:30 |
43998 | LG | CC | 28/01/2015 12:00 |
Thanks.
Amelia,
look at the attached doc.
Andrea
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 | STAGE1 | STAGE2 | DATE |
45435 | CM | AP | 18/05/2015 15:32 |
45435 | PD | CM | 24/04/2015 14:24 |
45435 | DTD | PD | 08/04/2015 14:11 |
45435 | MR | C | 08/04/2015 14:10 |
45435 | D | MR | 05/06/2015 18:28 |
45435 | DA | D | 01/04/2015 18:01 |
45435 | RE | DA | 28/03/2015 17:14 |
45435 | RA | RE | 28/03/2015 16:38 |
45435 | MR | RA | 13/03/2015 16:49 |
45435 | CS | MR | 27/02/2015 13:30 |
45435 | QR | CS | 27/02/2015 13:29 |
45435 | MR | QR | 27/02/2015 13:28 |
45435 | TA | MR | 11/02/2015 14:51 |
45435 | CC | TA | 11/02/2015 14:51 |
45435 | CC | CC | 28/01/2015 13:30 |
45435 | LG | CC | 28/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
please can help
It's possible, please look at what I did to identify min date between multiple CC.
Regards
Andrea