Skip to main content
Announcements
Introducing Qlik Answers: A plug-and-play, Generative AI powered RAG solution. READ ALL ABOUT IT!
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

Peek Question

Hi folks,

i'm having issues with the below. Can you give me the right hint please. I would like to get what is listed as a WISHED RESULT Table. But the script FIRST_ORDER doesn't seem to work.

Thank you,

/M

// DEMO LOAD
ORDER:
Load * Inline [
Customer|Order
101|2013
101|2011
102|2009
103|2015
101|2017
103|2018
]
(delimiter is '|');

// THIS DOES NOT WORK NOW
F
IRST_ORDER:
Load Customer, Peek(Order,0) As FirstOrder
Resident ORDER;

// WISHED RESULT:
//
// Customer, FirstOrder
// 101, 2011
// 102, 2009
// 103, 2015

1 Reply
sunny_talwar

Try this

ORDER:
LOAD * Inline [
Customer|Order
101|2013
101|2011
102|2009
103|2015
101|2017
103|2018
]
(delimiter is '|');

F
IRST_ORDER:
LOAD Customer,

    Min(Order) As FirstOrder
Resident ORDER

Group By Customer;