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

Announcements
Qlik Connect 2026 Agenda Now Available: Explore Sessions
cancel
Showing results for 
Search instead for 
Did you mean: 
jimbo20814
Creator
Creator

Equivalent to SQL Server Lead and Lag

Is there component and or code in Talend I could use that's the equivalent to SQL Server Lead and Lag? In a dataset, with Lead and Lag, one is able to get value(s) from a prior or subsequent row.

Labels (2)
1 Reply
TRF
Champion II
Champion II

For Lead() function you can use tMemorizeRows.
For lag() I'm afraid this is not possible with standard components. You probably will have to proceed by yourself with something like:
- add a column with row number
- sort the result set with this column in reverse order
- use tMemorizeRows (previous row was next one before to reverse the order).
Could be, for huge result sets...