9 Replies Latest reply: Oct 10, 2017 4:47 AM by Chadwick Leung RSS

    Finding people who bought a/few product(s) but not other product(s)

    Chadwick Leung

      Hi there,

       

      Much appreciate if anyone can show me some hints or the solution for the following situation.

       

      TABLE_1:

      LOAD * INLINE [

      Area,Customer,Product

      East,A,P1000

      East,A,P1001

      East,A,P1002

      West,B,P1000

      West,B,P1004

      East,C,P1000

      East,C,P1005

      East,C,P1006

      East,C,P1002

      East,D,P1004

      East,D,P1005

      West,E,P1000

      West,E,P1002

      West,E,P1008

      West,E,P1009

      ];

       

      How to count by Customer and by Area

      1) bought P1000 but NOT bought P1004

      2) bought (P1000 & P1002) but NOT bought (P1008 & P1009)

       

      Regards,
      Chadwick