Alteryx Designer Desktop Discussions

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

Align Data in same row

scollier1993
7 - Meteor

Hello Alteryx Community.

My problem is as follows. 
I have data (more columns than in my example), that is in a staggered format like this:

 

IDNameFood_IDFavorite FoodDescriptionSport_IDFavorite SportDescription
1Tom1AppleRound   
1 2BananaLong   
1    1SoccerBall
1    2Kung-FuFight
1    3ChessStrategy
2Mark1PizzaHot   
2    1TennisBall
2    2HockeyIce

 

I somehow need to move all the data into the top row of each person, so that the data essentially looks like this:

 

IDNameFood_IDFavorite FoodDescriptionSport_IDFavorite SportDescription
1Tom1AppleRound1SoccerBall
1 2BananaLong2Kung-FuFight
1    3ChessStrategy
2Mark1PizzaHot1TennisBall
2    2HockeyIce

 

Any person could have X amount of favorite foods or favorite sports. 

 

Any ideas are greatly appreciated!

 

Thank you!

 

3 REPLIES 3
AngelosPachis
16 - Nebula

Hi @scollier1993 ,

 

I've created a workflow that tackles this problem.

 

AngelosPachis_0-1608070999086.png

 

Essentially I transposed the data to bring them in a long form and then I used a multi-row formula to flag consecutive blank cells in each column. Then I have assigned a new row ID and cross-tab back into the original form.

 

Hopefully that works for you, let me know if there are any questions.

 

Regards,

 

Angelos

Hi @scollier1993 

 

This is another way of doing it. Hope it helps. Cheers!

 

christine_assaad_0-1608071634850.png

 

scollier1993
7 - Meteor

Ingenious! Thank you!

Labels