Find the matching numbers between two sets

I have two columns in same table i need to extract the matching numbers and count them .
There are no documentation for intersection in knime groupby node. Set operations are behaving wrongly.

Eg
Card. List 1. List2 output
Card 1 [ 1 2 3 4 5 6 ] [ 3 4 5 7] [3 4 5 ]
Card 2 [ 34 56 78 35 ] [2 44 67 ]

Card 3 [ 34 67 98 76] [ 67 56 45 34 ] [34 67]

Did you already try out Set Operator node? If not maybe that could help
br

2 Likes

I tried but it doesn’t help to find the intersection of two sets,

Hi @hapisnake , it does find the intersection but unfortunately you need to ungroup your sets into individual rows (one member per row) and then supply each column of set members to the Set Operator node.

As you have sets for each “card” you’d probably need to perform this in a group loop (group by card) to get the results you require.

1 Like

Try this:

intersection of sets.knwf (134.0 KB)

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.