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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
sarahshong
Contributor III
Contributor III

distinct field with multiple previous rows up

This is probably a simple question due to being a beginner....but I want to identify a field that is more rows up than just previous in the load script. I prefer this to be named to a new field in the load script due to sorting issues, but open to ideas within a straight table as well.

I have ordered my table by a "Date" field and I want to identify the Date that exists 9 rows up in the table and call it "Prev_Date".

I tried the previous function, but then realized that I have multiple of the same date. So I will need to make the Date field distinct and then look 9 dates up. Any ideas?

2 Replies
oscar_ortiz
Partner - Specialist
Partner - Specialist

Sarah,

Could you provide some sample data, with expected outcome?

Thanks

Oscar

MarcoWedel

Peek(Date,-9) as Prev_Date