Looking for some assistance from the community on a cross tab and concatenate. Table below is my original source data. It consists of a long list of patients and each has a corresponding TOS code. As you will see some patients have multiple codes. Looking to concatenate these unique codes all into one column that can then be joined to my dataset, which is the 2nd image below. Workbook attached if its helpful.
Original data:
| Patient ID | TOS |
| Patient 1 | 98 |
| Patient 2 | 94 |
| Patient 2 | 95 |
| Patient 3 | 96 |
| Patient 3 | 95 |
| Patient 3 | 93 |
| Patient 3 | 92 |
| Patient 4 | 92 |
| Patient 4 | 95 |
Desired Outcome:
| Patient ID | TOS |
| Patient 1 | 98 |
| Patient 2 | 94, 95 |
| Patient 3 | 96, 95, 93, 92 |
| Patient 4 | 92, 95, 96, 97 |