Dynamic Column Addition and Row Compression
- 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
Hello,
I have a data set with rows of repeating values I would like to condense to a single row based on the value of a specific column if the values are the same. I've poked around and seen the multi row and iteration macro tools, but I'm not sure if they match exactly what I'm after. Below is an example input and output. If the item number is the same it will move the corresponding values form the following rows to new columns to the right, but there could be any number of actions. Any advise if appreciated!
Input:
Item| Action | Done by| Date Performed |
123 | Moved| User3 | 6/5/2022 |
123 | Moved| User3 | 6/6/2022 |
123 | Moved| User3 | 6/7/2022 |
321 | Moved| User3 | 6/5/2022 |
321 | Moved| User3 | 6/6/2022 |
121 | Moved| User3 | 6/5/2022 |
Output:
Item| Action | Done by| Date Performed |Action | Done by| Date Performed |Action | Done by| Date Performed |
123 | Moved| User3 | 6/5/2022 | Moved| User3 | 6/6/2022 | Moved| User3 | 6/7/2022 |
321 | Moved| User3 | 6/5/2022 | Moved| User3 | 6/6/2022 |
121 | Moved| User3 | 6/5/2022 |
Solved! Go to Solution.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
I created the input file to test this with, but I think I hit the main parts. I think this should do what you are looking for or at the least get you close to what you are wanting.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
@Adrummon1 Is your input file is pipe delimited into one line per record or they are coming separate columns?
- 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
One very easy way to achieve this.
Remember that Alteryx does not allow having two columns with the same names within the same dataset.
So you have the choice in this solution to rename them after the split.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Thank you for the feedback everyone! I ended up going with Sapna's solution, but all of these appear to do exactly what I needed, and I was able to dissect and figure out why for future use. Really appreciate everyone's time taken to answer!
