Hi, I have data at transactional level, where several transactions can form a single invoice. Assuming one invoice has 3 transactions with a different 'product group' (out of perhaps 10 available product groups), I would like to understand how many invoices contain which combinations of product groups. e.g.
invoice 1 trx1 - 3 apples = FRUIT product group trx2 - 2 twix bars = SNACK product group
invoice 2 trx1 - 1 orange = FRUIT product group trx2 - 1 newspaper = NEWSPAPER product group
invoice 3 trx1 - 1 apple = FRUIT product group trx 2 - 3 mars bars = SNACK product group trx 3 - 2 oranges = FRUIT product group
I would like to count how many invoices have both FRUIT and SNACK product groups, in this case the overlap should equal 2 (because invoices 1 and 3 have this combination). So far, I have managed to get the number of invoices for each of the product groups separately, but with no overlap between any of them (just 0 values).
Aggregation at invoice level doesn't seem to change anything. Any ideas? Thanks in advance!