Skip to main content
Announcements
Qlik Connect 2025: 3 days of full immersion in data, analytics, and AI. May 13-15 | Orlando, FL: Learn More
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to display the next value of a column in separate column.

hi,

i have two  column as time and defect id.The defect id has different time and date.i need to show the start date and end date of defect id.

defect id          time      

1                 2014-05-26 00:07:52

1                 2014-05-26 07:15:32

1                 2014-05-26 22:41:34

i want 4 columns to display in qlikview :

defect id          time                                   start date                                       end date

1                 2014-05-26 00:07:52             2014-05-26 00:07:52                     2014-05-26 07:15:32

1                 2014-05-26 07:15:32             2014-05-26 07:15:32                     2014-05-26 22:41:34

1                 2014-05-26 22:41:34              2014-05-26 22:41:34                  todays date

1 Reply
MK_QSL
MVP
MVP

Something like below

Script

=================================

Temp:

Load

  [defect id],

  Timestamp(time) as time,

  RowNo() as NO

Inline

[

  defect id, time    

  1,               2014-05-26 00:07:52

  1, 2014-05-26 07:15:32

  1, 2014-05-26 22:41:34

];

NoConcatenate

Final:

Load

  [defect id],

  time,

  time as StartDate,

  IF(NOT IsNull(Previous(time)),Previous(time),TimeStamp(Today())) as EndDate,

  NO

Resident Temp

Order By NO Desc;

  Drop Table Temp;

  Drop Field NO;

==========================================

NOW Create a straight table or table box with your required fields...