ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests Early 2026. Make sure to check your account preferences in my.alteryx.com to make sure you have filled out your security questions. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
GELÖST

Cleaning up address Data

cablejarrett
Meteoroid

I currently have a large file where the street address is anywhere in 3 different rows address line 1, address line 2, or address line 3. I would like to be able to pick out where the cell that starts witha  number is populated in a new row to help clean this up.  Is that possible?

 

Jarrett

6 ANTWORTEN 6
binu_acs
Polaris

@cablejarrett Would you be able to provide some sample data and expected output?

cablejarrett
Meteoroid

yes. 

 

I cant put the actual data but I put what I expected in D 

 

basically any of those that start with a number I want to put into a new row. 

 

 

MilindG
Quasar
cablejarrett
Meteoroid

thank you for this. 

 

it almost workedd 

 

I have a file with more data on it than address that I want to keep (sorry I cant share the entire file) 

 

another issue is it shifted up and screwed up those that didnt have a number at all. (those I just would need to be blank. 

 

attached a new sample

MilindG
Quasar

@cablejarrett See if this works

Hi @cablejarrett 

 

You can clean up these addresses fields with the REGEX_Match() function, it returns true/false when the pattern is found/not found, just like this:

 

if REGEX_Match([Address Line 1 ], "\d.*") Then [Address Line 1 ]
ElseIf REGEX_Match([Address Line 2], "\d.*") Then [Address Line 2]
ElseIf REGEX_Match([Address Line 3], "\d.*") Then [Address Line 3]
Else 'BLANK'
Endif

 

The condition returns the Address fields fullfilling the condition starting with number; if 2 or more fields start with number, the first field is taken.

 

Address_Cleaner_01.png

Results:

Address_Cleaner_02.png

 

hth

Arnaldo

 

Beschriftungen
Top-Lösungs-Autoren