Qlik Community

QlikView Scripting

Discussion Board for collaboration on QlikView Scripting.

QlikView Fans! We’d love to hear from you.
Share your QlikView feedback with the product team… Click here to participate in our 5-minute survey.
Rules, plus terms and conditions, can be found here.
Not applicable

Get the next field value


I want to create a new column in my script where I use a value i the next row. My table is sorted the way I want it, so that's not an issue. I have created another column where I use a value on the previous row by using the Previous function. Is there a function in QlikView that allows me to compare a field value in the current row with a field value in the next row so that I can create my new column?

Best regards, L. Sletten

Tags (2)
2 Replies

Re: Get the next field value


You can use the Column() function, where Column(1) refers to the first expression column, Column(2) to the second, and so.

Hope that helps.


Not applicable

Re: Get the next field value

Hi Lindasletten,

Actually you're looking for the next() function, right? Which functions exactly as the previous function, but instead returns the value of the next record... Correct?

If so, then the answer is that the next() function does not exist, but there is a way to work around it: sort your data descending (perhaps in a resident table) and use the previous function. This gives the same result.



When you load field 1 and 2 from the  the table above sorted desc on field 1, the 'next-fieldValue' column can be calculated using the previous(field2) expression.

Community Browser