4 Replies Latest reply on Mar 2, 2018 9:41 AM by Matt Coles

    Check rows within a nested partition have the same values

    Christabelle Santos

      Hi all,

       

      I have a table with two IDs, and I need to check that for a particular ID1 and ID2, all the products are the same and the same number of products.

       

      For example in the table below, I have 10001 which has 123 and 234, and there's a line missing which is 123 having Product 2, and

      for 20002, 345 and 456 both have Product 3 and 4 but, there's a difference in the last product. I need to find such cases in my data.

       

       

      ID1
      ID2
      Product
      10001123Product 1
      10001234Product 1
      10001234Product 2
      20002345Product 3
      20002345Product 4
      20002345Product 5
      20002456Product 3
      20002456Product 4
      20002456Product 6

       

      The perfect scenario will be, which will be correct.

      ID1
      ID2
      Product
      10001123Product 1
      10001123Product 2
      10001234Product 1
      10001234Product 2
      20002345Product 3
      20002345Product 4
      20002345Product 5
      20002456Product 3
      20002456Product 4
      20002456Product 5

       

      Any suggestions on a way to find the cases in the first table? Thanks!