Name | Date | Event | Time Gap |
---|---|---|---|
A | 04/01/2012 | TEXT | |
A | 03/05/2013 | TEXT | |
A | 04/12/2013 | TEXT | * |
B | 01/01/2016 | TEXT | |
C | 09/27/2015 | TEXT | |
C | 10/04/2017 | TEXT |
I want to calculate the time gap between the dates by Name.
for * marked cell, fill the cell with the number value(number of days difference between 04/12/2013 and 03/05/2013).
for Name B, there is just one date value, so just leave it Time Gap cell as '-'
Could anybody help me??
How about using this in the script?
If(Name=peek(Name),Date-peek(Date),'') as [Time Gap]
How about using this in the script?
If(Name=peek(Name),Date-peek(Date),'') as [Time Gap]
What will be the difference between third A and 2nd A???
LOAD Name,
Date,
Event,
if(Peek(Name)=Name,(Date)-Peek(Date),'-') as Gap
FROM
[https://community.qlik.com/thread/250763]
(html, codepage is 1252, embedded labels, table is @1);
they are the same, 1st,2nd and 3rd A.
Thank you