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: 
Not applicable

Delete Duplicates in table

Hello,

I have a table like this:

AA-TEST
CTEST
BB-TEST
CC-TEST

I want to delete lines to get a table like this:

AA-TEST
BB-TEST
CC-TEST

When you have two lines with the same key (first column), just preserve the last one.

Can someone help me on this please?

Thanks,

Regards,

Loïc

1 Solution

Accepted Solutions
Clever_Anjos
Employee
Employee

T:

LOAD F1,F2,-RecNo() as Ord INLINE [

    F1, F2

    A, A-TEST

    C, TEST

    B, B-TEST

    C, C-TEST

];

LOAD

  F1 as Final,

  F2

Resident T

Where not Exists(Final,F1)

order by Ord;

drop table T;

View solution in original post

2 Replies
Clever_Anjos
Employee
Employee

T:

LOAD F1,F2,-RecNo() as Ord INLINE [

    F1, F2

    A, A-TEST

    C, TEST

    B, B-TEST

    C, C-TEST

];

LOAD

  F1 as Final,

  F2

Resident T

Where not Exists(Final,F1)

order by Ord;

drop table T;

Not applicable
Author

Also in Presentation Tab, Select the 'Final' column and check 'Omit Rows Where Field is NULL'.