I've always tried to find a solution to this problem and it has always escaped me.
There are two columns of importance. A customer number and a product number.
Row Customer ID Product ID
1 1011 A
2 1011 B
3 1011 C
4 1012 A
5 1013 B
6 1014 A
7 1014 C
8 1015 C
I would like to have another column that flags any Cutomer ID that has purchased a given Product ID, but I also want to flag all the rest of the Product ID's they have purchased.
In the table above, if a customer had purchased Product A, all Product IDs from that customer should be flagged. The result would be that rows 1, 2, 3, 4, 6, and 7 would be flagged.
Any ideas?
There are two columns of importance. A customer number and a product number.
Row Customer ID Product ID
1 1011 A
2 1011 B
3 1011 C
4 1012 A
5 1013 B
6 1014 A
7 1014 C
8 1015 C
I would like to have another column that flags any Cutomer ID that has purchased a given Product ID, but I also want to flag all the rest of the Product ID's they have purchased.
In the table above, if a customer had purchased Product A, all Product IDs from that customer should be flagged. The result would be that rows 1, 2, 3, 4, 6, and 7 would be flagged.
Any ideas?