Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

how to eliminate the duplicate rows in qlikvew

how to eliminate the duplicate rows in qlikvew

idname
1a
1a
2b
2c
3d

i want to o/p like this

1 a

2 b

3 d

eliminates the duplicates in id.

23 Replies
peschu123
Partner - Creator III
Partner - Creator III

TABLE:

LOAD DISTINCT

     id,

     name

FROM .... ;

jagan
Luminary Alumni
Luminary Alumni

Hi,

Try like this

LOAD
DISTINCT

id, name

FROM TableName;

Regards,

Jagan.

Not applicable
Author

use distinct keyword

distinct ID, name

jyothish8807
Master II
Master II

Hi harish,

     Since you have two different name for ID=2, you will get two entries for ID=2.

Regards

KC

Best Regards,
KC
jyothish8807
Master II
Master II

Hi Jagan,

I tired following but when i load no field is coming. Can you tell me what is the issue?

tab1:
LOAD * INLINE [
   ID, Name
    1, a
    1, a
    2, b
    2, c
    3, d
];

tab2:
load distinct
ID,
Name
resident tab1;
drop table tab1;

Regards

KC

Best Regards,
KC
khalander
Creator II
Creator II

Hi,

Use Distinct keyword in Load statement

Regards,

khalander

Not applicable
Author

Hello,

I doubt if the distinct keyword will work here. 2,b and 2,c are not duplicate rows (Yes the ID is duplicate) but rows are not so qlikview will treat them as  separate rows.

Thanks

Amit

Not applicable
Author

Hi Jyothish,

You are getting no data because two tables are auto concatenated and then you are dropping the tab1.

You should try something like this

Test:

load * inline

[

id,name

1,a

1,a

2,b

2,c

3,d

];

Test1:

load Distinct id,name,1 as RecordCounter Resident Test;

drop Table Test;

Thanks

Amit

rubenmarin

Hi, you can use exists to check if a id is previously loaded

LOAD
id, name

FROM TableName where no exists('id', id);

This will load the first id and name found.