SOLVED
How to convert data from vertical to horizontal
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
amitshaw11237
5 - Atom
‎11-06-2023
04:10 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I want to convert data from vertical to horizontal, but I want more than first and the last value, as crosstab can return only either first or last record. But suppose I have 3 or more than how to return all the values. For example:
Input:
ID | Column_Header | Name |
ABC123 | Col1 | Request 1 |
ABC123 | Col2 | Request 21 |
ABC123 | Col2 | Request 22 |
ABC123 | Col3 | Request 3 |
ABC123 | Col4 | Request 41 |
ABC123 | Col4 | Request 42 |
ABC123 | Col4 | Request 43 |
ABC123 | Col5 | Request 51 |
ABC123 | Col5 | Request 52 |
ABC123 | Col6 | Request 61 |
ABC123 | Col6 | Request 62 |
ABC123 | Col6 | Request 63 |
Output:
ID | Col1 | Col2 | Col3 | Col4 | Col5 | Col6 |
ABC123 | Request 1 | Request 21 | Request 3 | Request 41 | Request 51 | Request 61 |
ABC123 | Request 22 | Request 42 | Request 52 | Request 62 | ||
ABC123 | Request 43 | Request 63 |
Solved! Go to Solution.
Labels:
- Labels:
- Data Investigation
4 REPLIES 4
PhilipMannering
16 - Nebula
‎11-06-2023
04:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
JosephSerpis
17 - Castor
‎11-06-2023
04:20 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @amitshaw11237 you can use a Multi-Row tool before you use a crosstab to create a rank field to use in the crosstab tool to ensure all records are spread across different lines. I have mocked up a workflow which showcases one way to approach this.
Qiu
21 - Polaris
‎11-06-2023
04:31 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@amitshaw11237
I will go with my favorite Tile tool.
‎11-06-2023
06:06 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for the solution, it worked like a charm!