Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Nocto
Contributor III
Contributor III

Quick Question to Peek() about referencing to input Table

Hey guys,

so why doesnt this Work:

Sales:
LOAD * INLINE [
Sales
100
200
300
400
];


Sales2:

load

peek(Sales, 'Sales') as S1

resident Sales;

I assumed with that I would get

S1
-
200
300
400

as output.

But

When I do this: peek(Sales,-1, 'Sales') as S1 it works but only get the last Entry.

so what do i not understand in this syntax?

 

2 Replies
rubenmarin

Hi, you can use (adding 2nd parameter to specify row to retrieve)

Sales2:
load
peek(Sales,RowNo(),'Sales') as S1
resident Sales;

But I don't know what are you trying to do this way, so maybe it's not what you need.

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

MayilVahanan

Hi @Nocto 

Simply, you can use like below

Sales:
LOAD *, Peek(Sales) as PeekSales INLINE [
Sales
100
200
300
400
];

FYIP: Peek starts with 0 for 1st row, 1 for 2nd row and so on..

Thanks & Regards, Mayil Vahanan R
Please close the thread by marking correct answer & give likes if you like the post.