Skip to main content
Announcements
Qlik Introduces a New Era of Visualization! READ ALL ABOUT IT
cancel
Showing results for 
Search instead for 
Did you mean: 
julie_mita
Contributor II
Contributor II

Table to display duplicate values only

Hi all,

have been trying a way to filter the data in a table but have not been successful.

My table looks like the below:

qs question.PNG

I need the table to display only records with two rows or more i.e. rows for Key Field 000111 and 000112.

Have tried a few things with no luck in the data handling section such as:

if(Aggr(count( [Key Field]),[Key Field])>1,1,0)

Do you have any suggestions?

4 Replies
jochem_zw
Partner Ambassador
Partner Ambassador

KeyField as dimension

and as expression:

if(count(KeyField)>1, 1,0)

balabhaskarqlik

Try the script like this:

ABC:
Load
          [Key Field],
          Date,
          [Key Field]&Date as [New Key Field],
         Age,
         Count([Key Field]) as Counts
from abc
           group by [Key Field];

Inner Join (ABC)

BCD:
Load
         [Key Field],
         Sum(Counts) as Frequency
Resident ABC
                  Group by [Key Field];

NoConcatenate

Duplicate_Check:
Load
         *,
          If(Counts > 1, 'Duplicate Records','No Duplicates') as [Duplicate Flag]
Resident ABC
                   Order by [Key Field];

Drop table ABC;

NoConcatenate

OnlyDuplicates:
Load
          *
Resident Duplicate_Check
                   Where Match([Duplicate Flag],'Duplicate Records');

Drop table Duplicate_Check;

julie_mita
Contributor II
Contributor II
Author

Thanks for your reply Jochem. 

Have tried this solution and it did not work unfortunately.

Tried converting the field to number for both dimension and measure but still no luck 😞 

 

julie_mita
Contributor II
Contributor II
Author

So have tried this solution and it also fails... I did not mention but the table is dynamic as it is driven by a date picker filter. Depending on the selection the results will vary. 

Do you have any other suggestions?