Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Removing the duplicates

Profile IDStatusCustId
780INPROG100
88INPROG200
789INPROG200
800INPROG300

Here the above given table has duplicate customer ID(200).

While loadind data from the table I would like to have the result like below by removing the duplicates completely.

Output:
Profile IDCustIdStatus
780100Complt
800300Cancel
12 Replies
sunny_talwar

Did you look at my response here:

https://community.qlik.com/message/1033667#986054

Not applicable
Author

Hi sunny,

Exact my problem is......

I have data like this......1000 records

sample data:

Barcode   create_date          prepared _By

123            24-04-2016           ravi

124            24-04-2016           teja

123            29--04- 2016         ---

345            26-04-2016           ----

346            26-04-2016           ---

345            29-04-2016           ---

I want these outputs:

0utput1:

Barcode      create date         prepared _By

123            24-04-2016           ravi

124            24-04-2016           teja

345            26-04-2016           ----

346            26-04-2016           ---

In above output using where condition prepared _By =''--' output2 will come no problem.

0utput2:

Barcode      create date         prepared _By

345            26-04-2016           ----

346            26-04-2016           ---

my main problem is output1 is not getting perfectly while using  Thirumal script....its workinh  some records its removing fst record and  some times second records its removing.....In duplicate  want remove only seconds time reapted records.

rubenmarin

Hi raviteja, your request is different from the original poster, he wanted to remove all duplicates while you want to keep the first one.

To achieve that you only need to use exist(), ie:

LOAD * FROM [Sample_Data] where not Exists(Barcode)

If Barcode was loaded in previous tables you need to change the field name to check:

LOAD *, Barcode as BarcodeTmp FROM [Sample_Data] where not Exists(BarcodeTmp);

DROP Field BarcodeTmp;