Good Day Everyone
I have a set of data where consists of 2 columns in which I am trying to arrive at the desired output column, Here is the data
For every pair of numbers in group - if the corresponding Group 2 is AB or DEF then the output needs to be 0.
If either one of the pair of Group has separate Group 2 value then they need to be 1.
For example in the below table for the PAIR - 191846 in Group the corresponding Group 2 is AB and AB, Hence the result should be 0 and 0 for both records.
For the PAIR - 191852 in Group the corresponding Group 2 is DEF and AB so they both need to be 1 and 1.
For the PAIR - 191900 in Group the corresponding Group 2 is AB and DEF so they both need to be 1 and 1.
I hope I have made the question clear. I would most definitely appreciate any ideas here.
Group | Group 2 | Desired Output |
191846 | AB | 0 |
191846 | AB | 0 |
191852 | DEF | 1 |
191852 | AB | 1 |
191860 | DEF | 1 |
191860 | AB | 1 |
191868 | AB | 0 |
191868 | AB | 0 |
191869 | AB | 1 |
191869 | DEF | 1 |
191871 | AB | 0 |
191871 | AB | 0 |
191874 | DEF | 1 |
191874 | AB | 1 |
191880 | AB | 0 |
191880 | AB | 0 |
191888 | AB | 1 |
191888 | DEF | 1 |
191894 | DEF | 1 |
191894 | AB | 1 |
191895 | DEF | 1 |
191895 | AB | 1 |
191897 | DEF | 0 |
191897 | AB | 0 |
191900 | AB | 1 |
191900 | DEF | 1 |
191901 | AB | 0 |
191901 | AB | 0 |
191902 | AB | 0 |
191902 | AB | 0 |
191903 | AB | 0 |
191903 | AB | 0 |
191904 | AB | 0 |
191904 | AB | 0 |
191905 | AB | 0 |
191905 | DEF | 0 |
191906 | AB | 0 |
191906 | AB | 0 |
Solved! Go to Solution.
@AbhijeetChib please see attached. I used a summarize tool to group by 'Group' and count distinct 'Group2'.