Create Columns based on variable
- 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 there--Alteryx Beginner here with a process improvement question.
Here's my scenario--I've got group numbers and personnel assigned to each group. If there is more than 1 person per group, I want to output them in additional columns. For example:
Input:
1 | Bob |
2 | Alice |
3 | Susan |
4 | Bob |
5 | Bob |
6 | Alice |
7 | Susan |
8 | Susan |
1 | Alice |
1 | Susan |
8 | Alice |
Output:
Group | Person 1 | Person 2 | Person 3 |
1 | Bob | Alice | Susan |
2 | Alice | ||
3 | Susan | ||
4 | Bob | ||
5 | Bob | ||
6 | Alice | ||
7 | Susan | ||
8 | Susan | Alice |
I am currently trying to do this with the Tile tool, but it's not very refined. I get unique tiles, filter on tile sequence and join to add the columns.
But it's sloppy because if there are more than 2 names, I have to do multiple joins. I am wondering if there is a way to make the flow iterate through the potentially changing number of name each week by reading the tile sequence number as a variable to create how ever many columns I need. I feel like there's probably a way to do this with the Formula tool, but I'm not experienced enough with Alteryx to figure it out yet. (i.e. If TileSequence = 4, create and populate 4 columns) Any ideas?
Thanks!
Solved! Go to Solution.
- Labels:
- Best Practices
- Optimization
- Workflow
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @Pokayoke
Here's a nice simple solution that achieves what you are looking for. Let me know if you have any questions.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
That's awesome. Exactly what I'm trying to do--and a good introduction to a couple tools I haven't looked at yet, hah!
Do you know if there's a way to sort the output in a way that the groups with multiple names are at the top?
