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

Alteryx Designer Desktop Discussions

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

Extract String Value before first space

JustynaMZ
7 - Meteor

I have a column with values and would like to receive column with results as below

Which formula to use?

Values Expected result
1234AB jsijsposod oidjpsdps sdjo1234AB
23AB dasw www23AB
2 REPLIES 2
Luke_C
17 - Castor
17 - Castor

Hi @JustynaMZ 

 

The string functions can help:

 

Left([Values],FindString([Values],' '))

 

The Left() function expects Left(string,length). The FindString allows us to find the first location (expressed as a number) of the identified string, so we can pass that through as the length.

 

Luke_C_0-1680713127921.png

 

 

MarqueeCrew
20 - Arcturus
20 - Arcturus

@JustynaMZ ,

 

You stated your challenge so elegantly!  You need the leftmost characters prior to the first occurrence of a space.  Well here is the formula for your result:

 

Left([Values ],FindString([Values ], " "))

// Will take leftmost characters before first space

 

Cheers,

 

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
Labels