Alteryx Designer Desktop Discussions

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

remove everything after '_' character

Sshasnk
8 - Asteroid

Hi,

I have a dataset and I have to remove everything affter '_'

 

namelast namecode
abcdef

MQ_ALs_234589

KJFKLJ

ERT_Alte_kjm56

FGHLKJH#3_LKJ
MKJHKL456_KL_MKL_KL

 

Output:

 

namelast namecode
abcdef

MQ

KJFKLJ

ERT

FGHLKJH#3
MKJHKL456

 

 

3 REPLIES 3
binuacs
20 - Arcturus

@Sshasnk This can be done with the help of the substring function

binuacs_0-1664284028690.png

 

DavidSkaife
13 - Pulsar

Hi @Sshasnk 

 

Here is a quick way of doing it, as long as you always want the data prior to the first _

 

DavidSkaife_0-1664284146208.png

 

Emmanuel_G
13 - Pulsar

@Sshasnk 

 

Find attached the way of doing this using Replace_first function.

 

Please do not hesitate to mark this answer as solution if it helped.

 

Emmanuel_G_0-1664284920116.png

 

Labels