Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Moving data based on criteria

shingrac
6 - Meteoroid

Hello! I am attempting to move data from one field to another. In my data, I have a PO box field, but that field contains addresses and other data that does not belong. How can I set up the formula to filter that information out and place into the correct field?

 

shingrac_0-1607457645297.png

 

As you can see in the photo, the "18 Main Street" would be data that would go into the "Address" field. The "University of Southern California" is data that would go into the "Vendor Notes" field. Is there a formula that will do all those actions in one? 

shingrac_0-1607466127461.png

See the fields above.

 

Thank you in advance for your help!

8 REPLIES 8
Qiu
21 - Polaris
21 - Polaris

@shingrac 
Is this brutal way working for your?

Or you can give the definite patter for each required field, we can use Contains or RegEx to handle it.

Qiu_0-1607463939100.png

 

shingrac
6 - Meteoroid

Sorry @qiu, I'm not quite understanding what you mean?

Qiu
21 - Polaris
21 - Polaris

@shingrac 
I think the second snapshot was not here why replied your question.

Next question, which row do you want the Adress and Vendor Note to locate? or all 3 row?

Meaning better your provide a data sample of desired output.

shingrac
6 - Meteoroid

I wanted to take the data in the PO box field and move either to address field or to vendor notes field. If the PO box field contains "PO Box," then it can remain. But, if the PO Box field contains an address like shown in the snapshot or if it contains any other information such as "University of Southern California," then that data does not belong in the PO Box field. If an address is in the PO Box field, then it needs to move to the address field (so, 18 Main Street would need to move from the PO Box field to the Address field). If the PO Box field contains information such as "University of Southern California," then that information needs to go into the "Vendor Notes" field.

 

Qiu
21 - Polaris
21 - Polaris

@shingrac 

Which one?

shingrac_0-1607466127461.png

 

 

shingrac_0-1607466127462.png

shingrac
6 - Meteoroid

The data will be in the same row. So the first screenshot. The university information needs to go next to "C/O Steve Lopes"

AngelosPachis
16 - Nebula

Hi @shingrac ,

 

I have created a workflow that answers your question, but I am unsure if this will be able to address the issue across the whole dataset.

 

AngelosPachis_0-1607521903544.png

 

We should know more about the pattern of strings that appear in that PO Box field, to better refine the solution to match your case.

 

However, give this a try and let me know if you have any question on what it does. In principal, you should be able to adopt the logic in your workflow and answer your question with some tweeks.

 

Hope that helps

 

Angelos

 

shingrac
6 - Meteoroid

Thank you so much for your help!

Labels
Top Solution Authors