Hey all, I'm trying to run a component similarity analysis between Finished Goods (FG) using Alteryx but unsure how to implement this.
Input - List of Finished Goods with their corresponding components

Expected Output - Matrix with similarity % for each finished good combination:

--------------------------------------------------------------------------------------------------------------------------------------------------------------------------
My approach for the solution is as follows:
1. Build a single list of unique FGs with a concatenated list of corresponding components in each row:

2. Build a matrix with the input and the concat list and search for each component in the corresponding concatenated list for each FG combination. If found, enter 1 else enter 0:

3. Sum up the values for each combination (eg. FG1-FG1, FG1-FG2, FG1-FG3, and so on):

4. Build a new matrix which represents the count of distinct components for each FG combination (for e.g. FG1 has components 1 and 2, while FG2 has components 1,3,4. So the resulting FG combination FG1-FG2 will have 4 distinct components (1,2,3,4):

5. Divide the matrix obtained in step 3 by the matrix from step 4, thereby giving the similarity matrix

Please let me know if there is a way to implement this in Alteryx, or if there's a better way to get to this output.
Thanks in advance for all your help!