Qlik Community

Ask a Question

New to Qlik Sense

If you’re new to Qlik Sense, start with this Discussion Board and get up-to-speed quickly.

Announcements
Welcome to our newly redesigned Qlik Community! Read our blog to learn about all the new updates: READ BLOG and REPORTED ISSUES
cancel
Showing results for 
Search instead for 
Did you mean: 
Not applicable

Counting Duplicate data in a field

I have created a field called Repeat Customer. This field Concatenates the Customer Name, Category, Sub-Category, and Type. I am trying to find the number of times each individual Repeat Customer comes back. I've tried doing this with a Sum/Aggr combo, but it is still giving me all of the values, even when there is only one instance of that value in the dataset. Here is an example. So I would not want to count The Katrina Bennett Value as a repeat, because it was two spate services she was getting. I would want to Count Jeffrey Sarlin as a duplicate because it was the same service.  Her is the function I'm using, would love to get some feedback on it.

Sum(Aggr(IF(count([Repeat Customer])>1,1,0),[Repeat Customer]))

2017-01-19_15-52-25.png

3 Replies
Specialist II
Specialist II

Try

=if(Aggr(count([Repeat Customer]),[Repeat Customer])>1,1,0)

MVP
MVP

How does your source data look like? Maybe you do have multiple records for each Katrina Bennet's two services?

Not applicable

That's exactly the case Stefan. two separate ticket ID's as well as the different Repeat Customer Field.

Wallo, that might be the correct answer. I thought I had to sum everything, but maybe not. Going to do a little data validation then I'll respond back.