Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Insert multiple entries in column based on one value

scollier1993
7 - Meteor

Hi All,

 

My problem is as follows. 

I have a table that looks like this: 

 

NameAgeFavorite Cities
Tom25Seattle
  New York City
  Atlanta
Mike29San Francisco
  Denver
  Chicago
  Detroit

 

Based on one value (in this example that would be the name), I need to add a new column, which I have in a separate table like this:

 

NameFavorite Food
TomPizza
TomBurger
MikeSpaghetti
MikeFish

 

I now want to pull those two together so that the end result looks like this:

 

NameAgeFavorite CitiesFavorite Food
Tom25SeattlePizza
  New York CityBurger
  Atlanta 
Mike29San FranciscoSpaghetti
  DenverFish
  Chicago 
  Detroit 

 

This is just an example, my actual data contains hundreds of cases that I need to go through, so doing that manually is hopefully avoidable 🙂 

 

Please let me know if anyone has any ideas 🙂

 

Thank you!

3 REPLIES 3
AMansour
11 - Bolide

Hi @scollier1993 

 

For the first table :

 

I'll first complete the Name field as I'll use it in the join process later. 

 

Then I'll add rank by Favorite Cities that I'll use also in the join 

 

for the second table :

 

I'll add rank by Favorite Food 

 

finally I'll join the two table using 'Name' and 'RANK' as join key.

 

Hoping that's will avoid you this lazy manual process 

 

Cheers

 

 

AbhilashR
15 - Aurora
15 - Aurora

Hi @scollier1993, attached is an implementation of the logic suggested by @AMansour.

 

Please let us know if you have questions.

scollier1993
7 - Meteor

Thank you! That was very helpful. 
I had to tweak it a little to make it work for my case, but definitely saved a lot of manual work!

Thanks again!

Labels