Skip to main content
Announcements
See what Drew Clarke has to say about the Qlik Talend Cloud launch! READ THE BLOG
cancel
Showing results for 
Search instead for 
Did you mean: 
lg92
Contributor II
Contributor II

New column like previous record than other by ID

Hi everyone,

I have follow table and i need to create a new field "TIME BEFORE" that has the previous record of TIME AFTER row but aggregate by ID (so the first row of TIME BEFORE of each ID is always empty/null). The load order must be by TIME AFTER.

ID        DATE        STATUS_BEFORE    STATUS_AFTER    TIME AFTER       TIME BEFORE
1   28/07/2021              ASGN                            RICE                 12:21:46
1   28/07/2021                RICE                            VIAG                 12:24:17                12:21:46
1   28/07/2021               VIAG                             POST               12:35:28                12:24:17
1   28/07/2021               POST                             INIZ                12:36:09                12:35:28
1   28/07/2021                INIZ                             SOSP               12:56:17                12:36:09
1   28/07/2021                SOSP                            INIZ                13:34:47                  12:56:17
1   28/07/2021                INIZ                             COMP               13:49:56                 13:34:47
2   25/05/2021               ASGN                           RICE                   11:33:40
2   25/05/2021               RICE                               VIAG                 13:29:09                 11:33:40
2   25/05/2021                VIAG                            POST                  13:46:13               13:29:09
2   25/05/2021              POST                               INIZ                  13:46:18              13:46:13
2   25/05/2021                INIZ                             COMP                  13:52:35              13:46:18
3   20/08/2021              ASGN                             RICE                   12:37:09
3   20/08/2021               RICE                              VIAG                 14:45:20                12:37:09
3   20/08/2021              VIAG                              POST                  15:28:22              14:45:20
3 20/08/2021               POST                               INIZ                   15:28:57               15:28:22
3 20/08/2021               INIZ                                COMP                  15:38:09               15:28:57

 

thanks in advanced

Labels (2)
1 Reply
Lauri
Specialist
Specialist

Use the Peek() function in the data load or Above() in the table.