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

Identify duplicate values in a column

Hi

Is it possible to identify duplicates values in a column and highlight the cell?

 

I have seen IF(ID=PREVIOUS(ID), 'Duplicate', Unique'), but this does not seem to work for me as the columns has several thousand IDs.

ID

009

893

802

934

184

12

181

184

908

099

181

12

009

et.

 

 

So for example, I would like it to identify the duplicates and possibly colour - can this be done in the script editor?

 

Thanks

1 Solution

Accepted Solutions
Taoufiq_Zarra

if you have other fields and you don't want to group in the source table

Data:
load * inline [
ID

009

893

802

934

184

12

181

184

908

099

181

12

009
];

left join 
load ID,if(count(ID)>1,'Duplicate','Unique') as Check resident Data group by ID;

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉

View solution in original post

2 Replies
Taoufiq_Zarra

Hi,

If I understood correctly, one solution :

Data:
load ID,if(count(ID)>1,'Duplicate','Unique') as Check inline [
ID

009

893

802

934

184

12

181

184

908

099

181

12

009
] group by ID;

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉
Taoufiq_Zarra

if you have other fields and you don't want to group in the source table

Data:
load * inline [
ID

009

893

802

934

184

12

181

184

908

099

181

12

009
];

left join 
load ID,if(count(ID)>1,'Duplicate','Unique') as Check resident Data group by ID;

 

output :

Capture.PNG

Regards,
Taoufiq ZARRA

"Please LIKE posts and "Accept as Solution" if the provided solution is helpful "

(you can mark up to 3 "solutions") 😉