Hello Alteryx Community,
I need assistance with figuring out how to fix the following problem below. The data listed is sample data but the data I received is a much larger set with more columns.
From the Input Table, you can see that the addresses were mapped incorrectly past the "Fist Name" column. I create the "Last Position" column and the "Offset" column to figure out how many columns each record is offset by. If the "Last Position" record is empty, the "Offset" returns 0.
Given the values in either the "Last Position" and "Offset" columns, how would I go about returning the records for the columns in the correct column and record order?
Example:
Input Table:
| UniqueID | First Name | Address | City | State | Zip Code | 7 | 8 | 9 | 10 | Last Position | Offset |
| 1 | Hanna | 9189 Roberts St. | Woodstock | GA | 30188 | | | | | | 0 |
| 2 | Dan | | | 866 Summerhouse Lane | Canandaigua | NY | 14424 | | | 8 | 2 |
| 3 | Rob | | 301 New Saddle St. | Nottingham | MD | 21233 | | | | 7 | 1 |
| 4 | Elizabeth | | | | | 353 North Beechwood Court | Palm City | FL | 34990 | 10 | 4 |
| 5 | Ross | | 16 Border St. | Loxahatchee | FL | 33470 | | | | 7 | 1 |
| 6 | Kevin | | | | 555 Redwood Street | Lakewood | NJ | 08701 | | 9 | 3 |
Output Table:
| UniqueID | First Name | Address | City | State | Zip Code |
| 1 | Hanna | 9189 Roberts St. | Woodstock | GA | 30188 |
| 2 | Dan | 866 Summerhouse Lane | Canandaigua | NY | 14424 |
| 3 | Rob | 301 New Saddle St. | Nottingham | MD | 21233 |
| 4 | Elizabeth | 353 North Beechwood Court | Palm City | FL | 34990 |
| 5 | Ross | 16 Border St. | Loxahatchee | FL | 33470 |
| 6 | Kevin | 555 Redwood Street | Lakewood | NJ | 08701 |
Thanks