Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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
FIRST_ORDER:
Load Customer, Peek(Order,0) As FirstOrder
Resident ORDER;
// WISHED RESULT:
//
// Customer, FirstOrder
// 101, 2011
// 102, 2009
// 103, 2015
Try this
ORDER:
LOAD * Inline [
Customer|Order
101|2013
101|2011
102|2009
103|2015
101|2017
103|2018
] (delimiter is '|');
FIRST_ORDER:
LOAD Customer,
Min(Order) As FirstOrder
Resident ORDER
Group By Customer;