Skip to main content
Announcements
Introducing a new Enhanced File Management feature in Qlik Cloud! GET THE DETAILS!
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 ?

1 Solution

Accepted Solutions
Not applicable
Author

u will get now try this

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

View solution in original post

19 Replies
giakoum
Partner - Master II
Partner - Master II

This works for me :

data:

LOAD * INLINE [

    Products

    apple

    banana

    orange

    mango

];

table1:

load

  Products,

  peek('Products',-1) as new

Resident data;

alexandros17
Partner - Champion III
Partner - Champion III

The second parameter means: start from the end -1 so you have mango. If you use RowNo() instead of -1 the result should change

francoiscave
Partner - Creator III
Partner - Creator III

Hi CommonQlik,

Use a function or a varible in the second parameter:

Random solution:

table1:

load

products

peek('products',Floor(rand()*4),'table1') as new /*There are 4 fruits in your table)*/

from xl sheet;

I search an Index solution...

François

its_anandrjs

Hi,

You have to iterate the peek function from

table1:

LOAD * INLINE [

    products

    apple

    banana

    orange

    mango

];

let vNoofRows = NoOfRows('table1');

Data:

LOAD

products,

     peek('products',IterNo(),'table1') as new

FROM

[Data\Test.xlsx]

(ooxml, embedded labels, table is Sheet1) While IterNo() <= $(vNoofRows);

But you can use Mapping load here rather than peek if you have two fields.

Regards

Anand

MarcoWedel

please define your expected result.

marcus_malinow
Partner - Specialist III
Partner - Specialist III

I'm not sure that peek will give you your desired result.

How about

table1:

load

products

from xl sheet;

LEFT JOIN (table1)

LOAD concat(DISTINCT products, ',') as new

RESIDENT table1;

Anonymous
Not applicable
Author

here my doubt is

can we use peek in loaded table or

we need to take resident have to use ?

is it same for previous function ?

Bill_Britt
Former Employee
Former Employee

Hi,

I would have to agree with Marco. What are you trying to do and what is the expected results. Peek is normally used to pull data from a certain row in a table.

Bill

Bill - Principal Technical Support Engineer at Qlik
To help users find verified answers, please don't forget to use the "Accept as Solution" button on any posts that helped you resolve your problem or question.
its_anandrjs

Hi,

Provide any sample data or expected output that what is your output then it will easy to understand the problem.

Regards

Anand