legalhustler
Well-known Member
- Joined
- Jun 5, 2014
- Messages
- 1,214
- Office Version
- 365
- Platform
- Windows
Hello,
I would like to know how I can transform this table:
To this, which basically appends red/pink underneath one another and blue/green underneath one another. I know I can create separate queries then do a merge, but was wondering if it could be done with one query:
I would like to know how I can transform this table:
Index | Region | Category | Red | Blue | Pink | Green |
---|---|---|---|---|---|---|
1 | North | Fruits | 5 | 6 | 3 | 10 |
2 | South | Clothes | 10 | 12 | 6 | 20 |
3 | East | Games | 15 | 18 | 9 | 30 |
To this, which basically appends red/pink underneath one another and blue/green underneath one another. I know I can create separate queries then do a merge, but was wondering if it could be done with one query:
Index | Region | Category | Red-Pink | Value | Blue-Green | Value1 |
---|---|---|---|---|---|---|
1 | North | Fruits | Red | 5 | Blue | 6 |
2 | South | Clothes | Red | 10 | Blue | 12 |
3 | East | Games | Red | 15 | Blue | 18 |
1 | North | Fruits | Pink | 3 | Green | 10 |
2 | South | Clothes | Pink | 6 | Green | 20 |
3 | East | Games | Pink | 9 | Green | 30 |