Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Don't forget to submit your entry for the Excellence Awards by October 30! | Need more information about the program? Check out the blog here
SOLVED

trim

Highlighted
8 - Asteroid

Hi All,

 

I want to convert the below formula in excel to alteryx can some one please help

 

TRIM(LEFT(K71,IFERROR(FIND(" - ",K71,1),IFERROR(FIND(" ",K71,1),LEN(K71)))))

 

where for eg K7 = 

ab/3/ /195027

 

the end result is 

MK/3/

 

Thank you.

 

regards

Rohini

Highlighted
11 - Bolide

Hi Rohini,

 

If you have K7 as 

ab/3/ /195027

 

the results of that formula would be :

ab/3/

 

Are you mixing up K7 and K71 that's referenced in the formula?

 

So if you're just looking to take the characters to the left of the space, or a dash, then you can use this formula...

 

IF FindString([Field1], "-") != -1 THEN
      Left([Field1],FindString([Field1], "-"))
ELSEIF FindString([Field1], " ") != -1 THEN
      Left([Field1],FindString([Field1], " "))
ELSE
       [Field1]
ENDIF

 

 

 

Highlighted
8 - Asteroid

thank you so much!

 

this worked perfectly.

Labels