I have a bill of materials tables that will contain the following key pieces of information.
1. BOM Code
2. Stock Code
Each BOM will have one or more stock codes. Example data as below
I am trying to create a way to select a single BOM Code and have Qlik compare all of the other BOM codes to show how similar they are. The first way of doing this is to show how many common ingredients there are.
So far I have filed in trying to use alternate states with the P function and I have also failed in trying to use two tables in the load joined by the common stock codes.
I am trying to get to a simple formula like the pseudocode below.