Hi, I have been using the multi-field formula, summarize, and tile tool in various combinations to try to get the results I need, and I just can't seem to get there!
My dataset looks something like these first 3 fields and I would like to add the fourth field, where, if the customer has been to ONLY company X then assign a 0 to each instance of customer (at the different sites). If the customer has been to ONLY company Y then assign a 1 to each instance of customer and if the customer has been to BOTH company X and Y then assign a 2 to each instance of customer.
Customer | Site | Company | New Field |
A | 1 | X | 0 |
A | 2 | X | 0 |
A | 3 | X | 0 |
A | 4 | X | 0 |
B | 4 | Y | 1 |
C | 5 | X | 0 |
C | 6 | X | 0 |
C | 4 | X | 0 |
D | 2 | X | 2 |
D | 5 | X | 2 |
D | 6 | X | 2 |
D | 4 | X | 2 |
D | 7 | Y | 2 |
D | 8 | Y | 2 |
I used the tile tool (company as unique field and grouping by customer) to get a tile number. Then used the formula IF [Tile_Num] = 1 AND [Company] = "X" THEN 0 ELSEIF [Tile_Num] = 2 AND [Company] = "Y" THEN 1 ELSE 2 ENDIF
Unfortunately, this only applies a 2 to the instances of customer where Company is Y and not X.
I may be overcomplicating this, any suggestions?
Thanks in advance!