Unlock a world of possibilities! Login now and discover the exclusive benefits awaiting you.
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.
See attached qvw. Do not try this on data sets with millions of records.
See attached qvw. Do not try this on data sets with millions of records.
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.