Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
FrankGrimm
Partner - Creator
Partner - Creator

skip the row in a load script

Hi together,

how can i skip to the next row in a data-source and read this value?

 

Thanks a lot!

 

 

Labels (1)
4 Replies
JHuis
Creator III
Creator III

I am not sure what you are trying to archieve. Maybe some sample data? 

marcus_sommer

It's a bit unclear ... but applying recno() and rowno() would provide the information which information from the source the loaded in which record in Qlik. With interrecord-functions like peek() and previous() within a sorted resident-load the values from any record could be checked and manipulated and/or flagged. Depending on the real scenario you may need a forward and a backward run and maybe a further one to delete the unwanted records. 

Kain_F
Contributor III
Contributor III

If you just want to see the next record of a certain column in a separate column next to the actual value of that column use peek in combination with rowno.

say you start like this:

column1 column2
1 name1
2 name2

 

In qlik you can load it like this: 

first_table:
load * inline
[column1,column2
1,name1
2,name2
] (delimiter is ',')

 

To get to this result:

column1 column2 column3
1 name1 name2
2 name2 -

 

you need to use the peek in combination with the rowno from the previously loaded table

result_table:
noconcatenate
load 
*,
peek('column2',rowno()) as column3
resident first_table;
drop first_table;

 

https://help.qlik.com/en-US/sense/November2022/Subsystems/Hub/Content/Sense_Hub/Scripting/InterRecor...

https://help.qlik.com/en-US/qlikview/May2022/Subsystems/Client/Content/QV_QlikView/Scripting/Counter...

 

vinieme12
Champion III
Champion III

your problem statement could be a bit more detailed, can you explain what you are trying to achieve

Some context and /or A sample with expected output will help members help you better

Vineeth Pujari
If a post helps to resolve your issue, please accept it as a Solution.