2 Replies Latest reply on Jan 8, 2015 1:36 PM by Bryan Sparks

    Customers who purchased product a, b, and c

    Bryan Sparks

      I have data structured as follows:

       

      customerID product count
      1 a 1
      2 a 1
      3 a 1
      1 b 1
      2 b 1
      3 b 1
      4 b 1
      1 c 1
      2 c 1
      3 c 1
      4 a 1
      5 a 1
      6 a 1
      5 b 1
      7 a 1
      4 c 1
      8 a 1
      9 a 1
      10 a 1
      11 a 1
      12 c 1
      13 c 1
      14 c 1
      15 c 1

       

       

      There are some rules around who can purchase these products. In order to buy product b, you must first own product a. However, you can buy product c without owning a or b. What I want is a count of unique customers who have purchased all three. This is a simplified data set as I have a lot more products and a lot more customers. To try and visualize it better, I created a table showing the each customer, the products they purchased, and subtotal of the count (see attached workbook). Now I want to count the customers who have a subtotal of 3, if that makes any sense. I can clearly see which customers I want to count in this example, but given the data structure I can't figure out how to do it. Anyone have any ideas?