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

Announcements
Qlik Open Lakehouse is Now Generally Available! Discover the key highlights and partner resources here.
cancel
Showing results for 
Search instead for 
Did you mean: 
Anonymous
Not applicable

delete duplicates by a key

Hi,

I have a table of 5 fields, but I my key is 3 fields, I don't want to have duplicates by this 3 fields.

I want to sort by this 3 fields and eliminate duplicates

How can I do it?

Thanks

1 Solution

Accepted Solutions
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps like this:

LOAD

     Field1,

     Field2,

     Field3,

     Field4,

     Field5,

     Autonumber(Field1, Field2, Field3) as Key

FROM

     ...source_data...

WHERE

     NOT EXISTS (Key, Autonumber(Field1, Field2, Field3) )

     ;

DROP FIELD Key;


talk is cheap, supply exceeds demand

View solution in original post

2 Replies
Gysbert_Wassenaar
Partner - Champion III
Partner - Champion III

Perhaps like this:

LOAD

     Field1,

     Field2,

     Field3,

     Field4,

     Field5,

     Autonumber(Field1, Field2, Field3) as Key

FROM

     ...source_data...

WHERE

     NOT EXISTS (Key, Autonumber(Field1, Field2, Field3) )

     ;

DROP FIELD Key;


talk is cheap, supply exceeds demand
jlongoria
Creator
Creator

I can think of a couple of things you may want to do but I'm not sure. Can you post sample data and sample desired results?