Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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 ?
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.
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.
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
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
for prdoucts u should put in single quoates i guess
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?
u will get now try this
Peek(Products,RowNo()-1,'data') as peek2
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?
great work manojqlik
Hi,
You can use
Peek('products',IterNo() - 1,'table1') as New
Regards,
Anand