I would like to tag my pivoted columns with a common name.
For example if this is my table.
Type | State | Value |
Soil | AR | 1 |
Trees | AR | 2 |
Plants | AR | 3 |
Rocks | AR | 4 |
Soil | IL | 6 |
Trees | IL | 7 |
Plants | IL | 7 |
Rocks | IL | 8 |
I would like to pivot it as below. By adding State as a tag to the column name created.
Type | State_AR | Sate_IL |
Plants | 3 | 7 |
Rocks | 4 | 8 |
Soil | 1 | 6 |
Trees | 2 | 7 |
Thank
Sreelatha