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

Find peers/neighbors amongst the data

I have the following data set:

column1, value
ABCD, data1
ABCD, data2

ABCD, data3

ABCD, data4

EFGH, data1

EFGH, data5

EFGH, data6

EFGH, data7

IJKL, data1

IJKL, data2

IJKL, data8

IJKL, data9

...


Q. By load script or an expression how can I determine how similar ABCD is to EFGH and IJKL?

E.g. ABCD has 2 values in common with IJKL: 'data1' and 'data2' . EFGH has 1 value in common with IJKL: 'data1'.

TO RETURN:
column1, peer , count_values_in_common

ABCD,  EFGH, 1                                                 

ABCD , IJKL,  2                                           

EFGH, ABCD, 1           

EFGH, IJKL, 1            


My goal is determine commonalities between one column1 value to another. Thank you in advance.

1 Solution

Accepted Solutions
Gysbert_Wassenaar

See attached qvw. Do not try this on data sets with millions of records.


talk is cheap, supply exceeds demand

View solution in original post

3 Replies
Gysbert_Wassenaar

See attached qvw. Do not try this on data sets with millions of records.


talk is cheap, supply exceeds demand
Anonymous
Not applicable
Author

I do have to run this on a rather large number of records, so if you do tweak this script I'd be very keen to see it.

Thank you for this working solution. Very helpful.

Anonymous
Not applicable
Author

Gysbert, quick follow-up question. Would you also know how to determine count_values_NOT_in_common?