Hi All,
My problem is as follows.
I have a table that looks like this:
Name | Age | Favorite Cities |
Tom | 25 | Seattle |
New York City | ||
Atlanta | ||
Mike | 29 | San 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:
Name | Favorite Food |
Tom | Pizza |
Tom | Burger |
Mike | Spaghetti |
Mike | Fish |
I now want to pull those two together so that the end result looks like this:
Name | Age | Favorite Cities | Favorite Food |
Tom | 25 | Seattle | Pizza |
New York City | Burger | ||
Atlanta | |||
Mike | 29 | San Francisco | Spaghetti |
Denver | Fish | ||
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!
Solved! Go to Solution.
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
Hi @scollier1993, attached is an implementation of the logic suggested by @AMansour.
Please let us know if you have questions.
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!