Alteryx Designer Desktop Discussions

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

Trying to remove part of a string from text in a column

KBBear
5 - Atom

Hello,

 

I am trying to remove a portion of text in a string in a column of data. I have tried different methods and tools and have struck out and I guess I am just missing something. I want everything after the open parentheses gone. There is no consistency in the number of characters that may before a "(" and just need everything after it removed. I have tried with the column as a V_String and as a String, though not sure if it makes a difference.

 

Here is an example of what I am dealing with and where i want to end up:

 

KBBear_1-1649948890788.png

 

A file of the data is attached. Any help is greatly appreciated.

 

Thanks,

Kevin

 

 

4 REPLIES 4
JosephSerpis
17 - Castor
17 - Castor

Hi @KBBear one approach to tackle this is use a Text to column tool and use ( as a delimeter to spilt the column. I mocked up an approach. You could also use Regex as another approach.

Luke_C
17 - Castor

Hi @KBBear 

 

Use a left function paired with a findstring function. 

 

LEFT([Field1],FindString([Field1],'('))

Luke_C_0-1649949876670.png

 

binuacs
20 - Arcturus

@KBBear another option using sub string function and the find string function

binuacs_2-1649950121213.png

 

binuacs_1-1649950078694.png

 

 

SubString([Data],0, FindString([Data], '('))

 

 

binuacs_0-1649949940177.png

 

KBBear
5 - Atom

Awesome! Two excellent solutions. Thank you guys so much! Knew there was a better mouse trap out there.

Labels