Skip to main content
Announcements
Qlik Connect 2024! Seize endless possibilities! LEARN MORE
cancel
Showing results for 
Search instead for 
Did you mean: 
daveatkins
Partner - Creator III
Partner - Creator III

How to calculate an expression indicating whether the value from a column is repeated in more than one row?

I have a data table containing names of people from different lists, combined in one large list by concatenating multiple data sources. For example, each person might "qualify" to be on the main/master list for multiple reasons and not all columns are duplicates, so this is not a case where I want to eliminate duplicates. I want to add a column in my table chart to indicate if a person is on the list more than once.

Example Data:

Name, Phone, PhoneLocation, Multiple Contact Methods?

Dave, 555-1212, home, yes

Dan, 555-0000, home, no

Dave, 555-7777, work, yes

This example seems silly, but imagine there are many more fields in the list and it is sorted by something unrelated to name or phone number. Is this a simple set analysis count or something?

15 Replies
kamal_sanguri
Specialist
Specialist

Probably this will help..

kamal_sanguri
Specialist
Specialist

Also the file which I used...

saurabh5
Creator II
Creator II

you can create a flag in your table like:

if

(count(Name)>1,1,0) as flag resident table..

this will create a flag which will identify which are duplicate and which are not.

Regards

Saurabh


daveatkins
Partner - Creator III
Partner - Creator III
Author

won't that just be 1 for all rows, since it will simply count the total number of names?

kamal_sanguri
Specialist
Specialist

Did you check the app that I attached?

kamal_sanguri
Specialist
Specialist

download the excel file put the data and then run the app after changing the path in QVW.. let me know..

saurabh5
Creator II
Creator II

it will count the names, and flag with number '1' if it repeating more than once in your column,and if the name is just once in the column then it will flag it as '0'.

daveatkins
Partner - Creator III
Partner - Creator III
Author

When I tried this, it counted all rows; it did not group by the name/account. To see what was happening, I simplified to:

load count(Account) as NumberOfRepeats

Resident Main;

this results in adding a new column which contains the count of all Accounts--the same number for each row

kamal_sanguri
Specialist
Specialist

I guess you didn't try this...