Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

how to trim left of a specific word

barb_mooney
5 - Atom

I have a column of data that looks like this

DIESEL TRUCKDISTRICT 1

TRAILERDISTRICT 10

TRIPAC BATTERYDISTRICT 11

TRIPAC DIESELDISTRICT 2

VP TRUCKDISTRICT 4

I want to remove everything to the left of the word "District"

 

for the life of me I cant figure out how to do this

 

Help please!

 

4 REPLIES 4
ChrisTX
15 - Aurora

Try the RegEx tool.

 

Regular Expression:

(.*)(DISTRICT)(.*)

 

Output Method: Parse

ChrisTX
15 - Aurora

Or Regular Expression

(.*)(DISTRICT.*)

which gives this output:

 

Capture.PNG

jsi
5 - Atom

My Excel brain told me to use the formula tool and below formula into a new field:

 

Right([Field1], Length([Field1])-(FindString([Field1], "DISTRICT")))

 

where field 1 contains your data

 

For RegEx mentioned by @ChrisTX it also worked using this : (.*)(DISTRICT.*) but I am still a bit unfamiliar with RegEx myself.

barb_mooney
5 - Atom

this worked perfectly

 

thank you!

Labels