Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Anakin_Qlikdeveloper
Contributor
Contributor

RowNo by Previous and Peek

Hello,

I'm sorting my data by id and descending date and label the first data with using Previous and Peek. 

It works but when I do this, if id and the date (not datetime) are the same , the id with null status  becomes the first but I want to do the opposite.

qlikcomm.PNG

My script;

LOAD *,

If(Previous([ID]) = [ID] , Peek(RN) + 1, 1) AS RowNo
Resident TempM
ORDER BY [ID],[Date] DESC;

And then  I load the data that RowNo equals 1 

Thanks for the help.

 

1 Reply
Dalton_Ruer
Support
Support

If that is your actual code it should be "Peek(RowNo)" not "Peek(RN)" since there is no field RN.