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

Announcements
Join us in Toronto Sept 9th for Qlik's AI Reality Tour! Register Now
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how can we pick first and last records of column

D SOUR DES

111 BOM DEL
111 DEL DBR
111 DBR LHR
222 BOM LUK
222 LUK PAK
222 PAK WC



We want result

id sour des
111 BOM LHR
222 BOM WC

Regards

Ashish

1 Reply
Not applicable
Author

Hi,

Your Script should be as follow

Test:

Load * Inline [

D, SOUR, DES
111, BOM , DEL
111, DEL , DBR
111, DBR , LHR
222, BOM , LUK
222, LUK , PAK
222, PAK , WC
];

Noconcatenate
Test_1:
Load D,FirstValue(SOUR) as SOUR,LastValue(DES) as DES
Resident Test Group By D;

Drop table Test;

Check the attached application.

Hope this helps you.

-Peterson