Qlik Community

QlikView App Dev

Discussion Board for collaboration related to QlikView App Development.

Announcements
Customer & Partners, DEC. 9, 11 AM ET: Qlik Product & Strategy Roadmap Session: Data Analytics REGISTER NOW
cancel
Showing results for 
Search instead for 
Did you mean: 
amitvermancl
Partner
Partner

Comparing 2 columns and then finding duplicates

Hi All,

I have 2 columns A & B, ideally they should have one to one mapping that is a entry in A should occur only once in B.

But in my case, the same entry is repeating multiple times in B, so I need to find the count of how many such duplicates are happening and count of duplicate entries (as in current example 1 is coming 3 times in B, 2 is repeating 4 times)

AB
11
21
31
42
52
62
72
89
99
109
5 Replies
Saravanan_Desingh

One solution is.

tab1:
LOAD * INLINE [
    A, B
    1, 1
    2, 1
    3, 1
    4, 2
    5, 2
    6, 2
    7, 2
    8, 9
    9, 9
    10, 9
];

Left Join(tab1)
LOAD B, Count(B) As CntB
Resident tab1
Group By B;
Kushal_Chawda

tab1:
LOAD * INLINE [
    A, B
    1, 1
    2, 1
    3, 1
    4, 2
    5, 2
    6, 2
    7, 2
    8, 9
    9, 9
    10, 9
    11,5
];

 

With column B as dimension you can use below expression

=Count({<B={"=count(B)>1"}>}B)

 

Annotation 2020-08-20 160935.png

nevilledhamsiri
Specialist
Specialist

Something like this?

nevilledhamsiri_0-1597948925903.png

 

nevilledhamsiri
Specialist
Specialist

Something like this?

nevilledhamsiri_1-1597949079201.png

 

Brett_Bleess
Support (Former)
Support (Former)

@Kushal_Chawda , @Saravanan_Desingh  Hey guys, I suspect the notification issue may have caused you not to see the updates on this one, so just wanted to let you know, I think it better to let you guys chime in again versus me trying to help given it is Development related, and we know that is not my strong area! 🙂

Cheers,
Brett

To help users find verified answers, please do not forget to use the "Accept as Solution" button on any post(s) that helped you resolve your problem or question.
I now work a compressed schedule, Tuesday, Wednesday and Thursday, so those will be the days I will reply to any follow-up posts.