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

Announcements
See why IDC MarketScape names Qlik a 2025 Leader! Read more
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

peek?


Hi I HAVE TABLE LIKE

Products:

apple

banana

orange

mango

when i go for load into qlikview

table1:

load

products

from xl sheet;    fine  up to here

now if i go for peek here

table1:

load

products

peek('products',-1,'table1') as new

from xl sheet;

now i am getting in new field

new:

mango

my question is peek will use for only one value ?

i want in loop format   like it has return   apple,banana,mango,orange all  how to do it ?

19 Replies
richard_chilvers
Specialist
Specialist

Several seem to be agreed that it may not be a good solution. So if you share with us what you want to achieve, I'm sure we can come up with some new ideas.

marcus_malinow
Partner - Specialist III
Partner - Specialist III

Ok, to solve the problem you posed, Peek and Previous are not the solution.

In answer to your question, they can both be used on an initial load from SQL or Excel or wherever. Or in a RESIDENT load.

Anonymous
Not applicable
Author

Hi i got answer from above reply

in the mean time i got more queries also

1)peek should used to get data for only one row or  multiple rows generally

2)we can use in the same table or must and should we need to take resident of that table and have to write peek there?

3) in  previous function how get data for multiple rows

4) if possible pls explain me clearly with some sample script using peek and previous ?

thank u very much in advance

Anonymous
Not applicable
Author

Hi try like this ,

i got near to your problem but one value (apple ) is missing .So if you got any idea please come up with a solution

data:

LOAD * INLINE [

    Products

    apple

    banana

    orange

    mango

];

peek:

load Products ,

Peek(Products,RowNo(),'data') as peek2

Resident data

Thanks

Anonymous
Not applicable
Author

for prdoucts u should put in single quoates i guess

Anonymous
Not applicable
Author

THATS I UNDERSTOOD

because

recno and rowno start with   value  1

but peek start with 0 so that first value is missing

can any one guide to get the first value also by using peek function?

Not applicable
Author

u will get now try this

Peek(Products,RowNo()-1,'data') as peek2

Anonymous
Not applicable
Author

one more doubt

previous(Products)   if i go with this then it is ignoring last record it means 4 th record why?

how to get 4th record  or previous will not give last record?

Anonymous
Not applicable
Author

great work manojqlik

its_anandrjs
Champion III
Champion III

Hi,

You can use

Peek('products',IterNo() - 1,'table1') as New

Regards,

Anand