Often bought with from Sales File
Hi,
I am trying to find out which articles have been commonly bought together from an Excel file listing sales. The end goal would be to have the top 3 of “often bought with” for each article, similar to what you often see in web shops.
In my sales Excel file, I have the ReceiptNrs and the ArticleNrs. Each Row has both, so if I buy two articles together, I have two rows with the same ReceiptNr, but different Article Nrs.
I started by reading the Excel File, using GroupBy ReceiptNr to get a list of all the articles being sold together during one particular purchase. I then remove the ReceiptNr and use Split Collection column to end with the result shown below. The idea was to now start from Split Value 1 to Split Value n, taking the ArticleNr of 1 and combining it with the other Split Values ArticleNrs together with a count of how often it occurred. Then I start from Split Value 2, go to Split Value n and do the same thing, and then for each row.
Can somebody help me how I get to my final goal with KNIME?