Hi, I created a Summarize tool for creating a pivot customer wise (Input 1) from various other inputs. Later used Join tool to get other data. But its creating multiple lines with same customer and same values and my balances are also duplicated because of that and giving a wrong output for aging. What should i do get avoid duplication. The region will be unique for the customer, however there are multiple lines in the input data. Below example is similar to my data.
Input 1 - Aging Pivot | |||||
Customer Name | 0-30 | 30-60 | 60+ | ||
A | 1 | 2 | 3 | ||
B | 4 | 5 | 6 | ||
C | 1 | 1 | 6 | ||
D | 0 | 5 | 3 | ||
E | 0 | 8 | 6 | ||
F | 4 | 1 | 3 | ||
Input 2 | |||||
Customer number | Region | PO# | Order Qty | Unit Price | Total price |
100 | Asia | 11 | 4000 | 0.388 | 1552 |
300 | Africa | 22 | 8000 | 0.626 | 5008 |
500 | NA | 33 | 16000 | 1 | 16000 |
100 | Europe | 44 | 8000 | 0.24 | 1920 |
200 | Africa | 55 | 4000 | 0.492 | 1968 |
300 | Australia | 66 | 4000 | 0.492 | 1968 |
400 | Europe | 77 | 5500 | 2 | 11000 |
600 | SA | 88 | 6700 | 3 | 20100 |
200 | Africa | 99 | 2300 | 0.87 | 2001 |
300 | Australia | 10 | 9000 | 0.99 | 8910 |
100 | Asia | 14 | 5670 | 0.238 | 1349.46 |
Many more lines like these | |||||
Inut 3 - Customer list | |||||
Customer number | Customer Name | ||||
100 | A | ||||
200 | B | ||||
300 | C | ||||
400 | D | ||||
500 | E | ||||
600 | F | ||||
Expected Result | |||||
Customer Name | 0-30 | 30-60 | 60+ | Regtion | Total |
A | 1 | 2 | 3 | Asia | 6 |
B | 4 | 5 | 6 | Africa | 15 |
C | 1 | 1 | 6 | Australia | 8 |
D | 0 | 5 | 3 | Europe | 8 |
E | 0 | 8 | 6 | NA | 14 |
F | 4 | 1 | 3 | SA | 8 |
This is happening because your Input #2 is not unique based on your key (which I am assuming is Customer Number) - use a Summarize tool here and you'll reduce the risk of "duplication"