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

Announcements
Want to see what's currently in public preview? We've pulled it all together in one place. Check it out here
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

Labels (1)
1 Reply
sunny_talwar
MVP
MVP

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;