I have an one CSV with a list of countries and their population (A). I have a second CSV with U.S. states and their populations (B). I'd like to implement a formula that matches states with = or < populations to that country and append that state and state pop information to Tablea A. Here's what I mean:
Example:
Table A:
Country | Population |
Afghanistan | 2666000 |
Albania | 10000 |
Table B:
State | Population |
Alabama | 1162900 |
Arkansas | 762600 |
Rhode Island | 9000 |
and I want my output to look like this:
Country | State Equivilent | Country Pop | State Pop |
Afghanistan | Alabama | 2666000 | 1162900 |
Afghanistan | Arkansas | 2666000 | 762600 |
Afghanistan | Rhode Island | 2666000 | 9000 |
Albania | Rhode Island | 10000 | 9000 |
What is the most effecient way to do this in Alteryx?
Solved! Go to Solution.
Easiest way is to use an Append Fields tool (which basically gives you a Cartesian join of your two data sets).
Then you just add a Filter tool that filters on the basis of the one population field being =< the other population field.
(As a note, in the Append Fields tool, you will need to change the default setting at the bottom of the Configuration so as to "Allow All Appends".)
Thanks! I begun with a union and added a flag for "Country" or "State" - I knew there must have been something closer to what I was looking for. Appreciate it. :)
User | Count |
---|---|
19 | |
15 | |
13 | |
9 | |
8 |