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

Expanding records based on relationship

bmoss
6 - Meteoroid

New to Alteryx, so forgive me if this is simple. 

 

I have: 

1. A table of City names ([CityName], [StateCode]) and all zip codes that they encompass. 

2. A variable table of cities in use for the week. Both as origins and destinations. Each origin+destination combo is one record.

 

I need: 

One combined table of every possible combination of zip code origin and destination. 

So if NYC to Los Angeles is one record on the second table, but NYC has 3 zip codes and LA has 2 zip codes, I need 6 records for the one pair.

 

I have previously been accomplishing this in Excel via Microsoft Query by creating relationships to the city,state field on both tables. 

I need the number of records to expand based on how many records correspond on the ZipCode tables

 

Any help would be appreciated. Even knowing what terminology to search (I’m not sure what this type of activity is called at this time). 

 

Thanks! 

4 REPLIES 4
BrandonB
Alteryx
Alteryx

Edit: It looks like you would just append one source to the other using the Append Fields tool. This could also be a join based on how you describe it. Would it be possible to provide the two sample datasets so that I can build a workflow for you?

Simha
9 - Comet

Hello @bmoss , Here's a solution that does the job:

 

Simha_0-1584562699205.png

 

bmoss
6 - Meteoroid

Wow, this looks perfect - Exactly what I needed!

Thank you for the assist!

Simha
9 - Comet

You are welcome @bmoss. I am glad it helped.

 

Simha

 

Labels