Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How do I load only first occurrence of field?

Dear qlik community, i'd be grateful if you could help me with the following issue.

I have the following source file, which I ordered by customer and payment terms

So I want to load customer only once, together with minimum payment terms

Source file - already ordered as shown and resident
Customerpayment_terms
AAA30
AAA60
BBB30
BBB60
BBB90
I only want to load
Customerpayment_terms
AAA30
BBB30

Thank you in advance

1 Solution

Accepted Solutions
maxgro
MVP
MVP

with not exists

replace load inline with load from your source

test:

load * where not exists(Customer);

load * inline [

Customer, payment_terms

AAA, 30

AAA, 60

BBB, 30

BBB, 60

BBB, 90

];

View solution in original post

2 Replies
maxgro
MVP
MVP

with not exists

replace load inline with load from your source

test:

load * where not exists(Customer);

load * inline [

Customer, payment_terms

AAA, 30

AAA, 60

BBB, 30

BBB, 60

BBB, 90

];

anbu1984
Master III
Master III

test:

load Customer,Min(payment_terms) As payment_terms Group by Customer;

load * inline [

Customer, payment_terms

AAA, 30

AAA, 60

BBB, 30

BBB, 60

BBB, 90

];