Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

Create Columns based on variable

Pokayoke
6 - Meteoroid

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:

1Bob
2Alice
3Susan
4Bob
5Bob
6Alice
7Susan
8Susan
1Alice
1Susan
8Alice

 

Output:

GroupPerson 1Person 2Person 3
1BobAliceSusan
2Alice  
3Susan  
4Bob  
5Bob  
6Alice  
7Susan  
8SusanAlice 

 

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. 

 

alteryx2.PNG

 

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!

 

 

 

2 REPLIES 2
jamielaird
14 - Magnetar

Hi @Pokayoke 

 

Here's a nice simple solution that achieves what you are looking for. Let me know if you have any questions.

 

Screenshot 2019-06-24 at 15.44.53.png

Pokayoke
6 - Meteoroid

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?

Labels