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

Repeat Value Count

Hi,

If there is one field named as " Customer_Complaint" , which has multiple repeat values in it.

So, How I can make count of repeated "Customer_Complaint".

Example:

Header 1Header 2
DateCustomer_Complaint
01/01/2014Break
02/01/2014Clutch
03/02/2014Clutch
05/02/2014Gear
10/02/2014Clutch
20/02/2014Break


In above example Customer_Complaint with value as "Break " repeated 2 times and "Clutch" repeated 3 times.

This is just an example, but in my database there is huge number of Customer_Complaints which are repeating.


I had tried "peek function" in script, but it compares only previous row value and In my scenario each values should  compare with whole values in the same  field "Customer_Complaint".

How I can do this.

Kindly Help.

3 Replies
sunny_talwar

Try this script:

Table:

LOAD * Inline [

Date, Customer_Complaint

01/01/2014, Break

02/01/2014, Clutch

03/02/2014, Clutch

05/02/2014, Gear

10/02/2014, Clutch

20/02/2014, Break

];

Join(Table)

LOAD Customer_Complaint,

  Count(Customer_Complaint) as Count

Resident Table

Group By Customer_Complaint;

Output:

Capture.PNG

Anonymous
Not applicable

Thanks Sunny T! You solved my problem! And this is a very neat solution!

Navars
Creator
Creator

Hi Sunny is that possible to count the repeated values count in expression level.