Skip to main content
Announcements
Join us at Qlik Connect for 3 magical days of learning, networking,and inspiration! REGISTER TODAY and save!
cancel
Showing results for 
Search instead for 
Did you mean: 
Applicable88
Creator III
Creator III

Delete duplicates in Error table

Hello,

I have something like this:

ErrornumberDate DescriptionMaterialAmount material involved Status
123456701.01.2020    closed
123456701.01.2020    open 
999999902.01.2020    closed
999999902.01.2020    open 
123456705.01.2020    closed
666665506.01.2020    closed
666666607.01.2020    closed
466666608.01.2020    closed

As you can see the dataset with the error report number 1234567 and 9999999 both have a status open and a status close. This is because if a case is not closed there are still a duplicate of that case in "open". When its closed I only have one value. since I want to show which errors are still not solved I want to remove the "close" duplicates of these cases which have a pedant which is still in "open" 

Note I can't use distinct, because otherwise I willl lose this dataset and cannot use another linked KPI window where I calculate the difference of open to close cases. I don't want to remove all close cases, I just want to remove the close cases of these report numbers which have a open case. Otherwise the "problem count" is false. 

 

Hope someone can help.

Thanks in advance.

Best 

 

 

13 Replies
Anil_Babu_Samineni

Design:

If(Index(Concat(TOTAL <Date> DISTINCT Status, ','), 'open'), 'open', Status)

Script:

You already have one solution by @ArnadoSandoval , May be some optimized script below

Table:
LOAD Errornumber,
Date,
Description,
Material,
[Amount material involved],
F7 as Status
FROM
[https://community.qlik.com/t5/New-to-Qlik-Sense/Delete-duplicates-in-Error-table/m-p/1760556#M174914]
(html, codepage is 1252, embedded labels, table is @1);

Left Join (Table)
Load Date, Concat(Status, ',') as Status_Copy
Resident Table Group By Date;

Final:
NoConcatenate
LOAD *, If(Index(Status_Copy,'open'), 'open', Status_Copy) as Expected
Resident Table;

Drop Table Table;

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Anil_Babu_Samineni

@Applicable88  Please check once and close the thread, If you feel that you got what you are expecting?

Best Anil, When applicable please mark the correct/appropriate replies as "solution" (you can mark up to 3 "solutions". Please LIKE threads if the provided solution is helpful
Applicable88
Creator III
Creator III
Author

Thanks @Anil_Babu_Samineni !

shopia4342
Contributor
Contributor

Thanks for the update and quick reply. I'll be sure to keep an eye on this thread.

Albany NY search engine optimization