Qlik Community

Ask a Question

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Join us at the Cloud Data and Analytics Tour! REGISTER TODAY
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

How to filter duplicate records

Hello Guys,

I want to load non duplicated fields into QView.

Tried the below code but does not help..please advise?


Load Distinct TradeID

Basically I have duplicated records in my exel and i would like to filter out those duplicate records when loading into QView.

Thanks very much!

 

4 Replies
Henric_Cronström

"Load distinct ... " does work, but it compares the entire record, i.e. all fields. So if you still have "duplicates", then they differ in a field value. It could for example be an additional blank space or something similar.

An alternative, if you just want to filter out duplicates of an individual field you could try

Load TradeID, ... From ... Where not Exists(TradeID):

Then you will get only the first instance of each TradeID.

HIC

vivientexier
Partner
Partner

Hi,

"Distinct" is a not only about one field. If you are loading 10 fields with different values except for the ID, QlikView will load everything.

Distinct works if your fields combinaison is unique.

Not applicable
Author

Hello,

I tried the below code:

Load as MOC_TradeID

From

(biff, embedded labels, table is )

Where not Exists(MOC_TradeID);

But…it is giving error when I reload my script..are you able to access please?

Jeremiah Lee

Product Manager for eWindow®, Global Trading Services

Platts

12 Marina Boulevard

#23-01, Marina Bay Financial Centre Tower 3

Singapore 018982

DID (65) 6530 6415 | Support (65) 6530 6530

Mobile (65) 9108 4192 | F (65) 6532 2700

Yahoo : jleeka75@yahoo.com<mailto:jleeka75@yahoo.com>

www.platts.com<http://www.platts.com/>

vivientexier
Partner
Partner

Does "MOC_TradeID" is rename in your LOAD ? You have to use the original name.

"Exists" works only if you already have load "MOC_TradeID" before in your script.