Unpivot? & rename columns
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi, I've been unsuccessful at un-pivoting a table. I've searched for some solutions already, and have downloaded some examples, but I'm no closer to a solution.
I think this is a combination of transpose, crosstab and dynamic rename but...I need some help!
My data looks like this:
id | year | population
a | 2020 | 10000
a | 2019 | 9999
b | 2020 | 20000
b | 2019 | 19999
Ideal output
id | population_2019 | population_2020
a | 9999 | 10000
b | 19999 | 20000
Best Regards,
Allan
Solved! Go to Solution.
- Labels:
- Preparation
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @allan ,
Attached is an example showing how to do it.
Take a look and let me know if this works for you.
Best,
Fernando Vizcaino
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for the quick response, can you screenshot the settings for the cross tab?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you both for your quick responses and both solutions work well. I accepted @fmvizcaino 's solution
