Hello! I currently have a dataset (like below). It lists sales of certain product categories by customer location. It does not list rows for product categories for which customers are NOT selling a category today. (For example, in table below, you will see Location 2 does not sell Pants or Shirts so no rows for that appear.)
Account | Location | Category | Total Location Sales | Location Category Sales |
Retailer A | Location 1 | Shoes | $10 | 2.00 |
Retailer A | Location 1 | Shirts | $10 | 5.00 |
Retailer A | Location 1 | Hairpieces | $10 | 1.50 |
Retailer A | Location 1 | Pants | $10 | 1.50 |
Retailer A | Location 2 | Shoes | $7 | 3.00 |
Retailer A | Location 2 | Hairpieces | $7 | 4.00 |
Retailer A | Location 3 | Shirts | $15 | 7.00 |
Retailer A | Location 3 | Hairpieces | $15 | 6.00 |
Retailer A | Location 3 | Pants | $15 | 2.00 |
I would like to have output like the following (bolded rows/column are additions) -- essentially, each location would have a row for ALL categories, whether or not they are selling today and then I can add a T/F column indicating whether the product is being sold.
Account | Location | Category | Total Location Sales | Location Category Sales | Selling Category? |
Retailer A | Location 1 | Shoes | $10 | 2.00 | Y |
Retailer A | Location 1 | Shirts | $10 | 5.00 | Y |
Retailer A | Location 1 | Hairpieces | $10 | 1.50 | Y |
Retailer A | Location 1 | Pants | $10 | 1.50 | Y |
Retailer A | Location 2 | Shoes | $7 | 3.00 | Y |
Retailer A | Location 2 | Shirts | $7 | N/a | N |
Retailer A | Location 2 | Hairpieces | $7 | 4.00 | Y |
Retailer A | Location 2 | Pants | $7 | N/a | N |
Retailer A | Location 3 | Shoes | $15 | N/a | N |
Retailer A | Location 3 | Shirts | $15 | 7.00 | Y |
Retailer A | Location 3 | Hairpieces | $15 | 6.00 | Y |
Retailer A | Location 3 | Pants | $15 | 2.00 | Y |
Any guidance in how to get there is much appreciated!!
The strategy here is to generate all combinations by Summarizing and Appending together. And then using The Join Tool to see what doesn't match. and Unioning on what falls out. Hope this makes sense.
Yes, it does, thank you so much!! I am going to try this out today or tomorrow and will let you know if any issues. Appreciate it!