I found some threads doing similar stuff but everything I can find doesn't seem to work for me.
I have a dataset similar to this:
| ID | MARKET | Other data |
| 1 | GA | 123123 |
| 2 | TN | 41642 |
| 3 | TN;GA | u76575 |
| 4 | AL;TN;NC;ND;TX | 3454 |
Trying to convert to
| ID | Market | AL | GA | NC | ND | TN | TX |
| 1 | GA | 0 | 1 | 0 | 0 | 0 | 0 |
| 2 | TN | 0 | 0 | 0 | 0 | 1 | 0 |
| 3 | TN;GA | 0 | 1 | 0 | 0 | 1 | 0 |
| 4 | AL;TN;NC;ND;TX | 1 | 1 | 1 | 1 | 1 | 1 |
| | | | | | | | |
I think it's some combination of creating a lookup table by converting the market's to rows and then doing a crosstab to create columns and generate result, but cannot figure it out.