6 Replies Latest reply: May 21, 2015 5:51 PM by Michael Solomovich RSS

    Product not exists - add manual values zero

      I have table

      table1:

       

      LOAD * INLINE [

      month,rep,sales,product

      Jan ,101,3000,p1

      Jan,102,2340,p1

      Jan,103,2450,p2

      Jan,103,1200,p1

      Jan,101,1211,p2

      Jan,103,1111,p2

      feb,102,5000,p1

      feb,103,4000,p2

      feb,102,2000,p3

      feb,103,6543,p1

      March,101,2310,p1

      March,103,1200,p2

      ];

       

       

      Rep 101 does not sell anything on month of Feb.

      I have a list of products

      p1,p2,p3,p4,p5

      I want to add the product p1,p2,p3,p4,p5 value 0 for feb for Rep 101 and

      March rep 101 already has sold product p1 -but I want to add p2,p3,p4,p5 for sales 0 for March.

       

      I have millions of records. Looping will kill my performance  for comparing the products.

       

      Please advice is there any better way to handle this situations.