Skip to main content
Woohoo! Qlik Community has won “Best in Class Community” in the 2024 Khoros Kudos awards!
Announcements
Nov. 20th, Qlik Insider - Lakehouses: Driving the Future of Data & AI - PICK A SESSION
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") 😉