Alteryx Designer Desktop Discussions

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

Does anyone know how to trunicate in Alteryx

dgcolby
6 - Meteoroid

I want to take a column of Data (example 145J) and use a RIGHT cmd to create a new column output that only keeps the last digit, in this example J.

 

I was thinking of using an IF/THEN statement for the same thing above. The column data I am analyzing has 3 digits followed by a letter (another example 145H), I thought by trunicating the data to just the letter, I could then write an expression that only keeps the J/H's all else would be NULL.

 

Any help would be great!

 

Regards!

 

Darin

4 REPLIES 4
fmvizcaino
17 - Castor
17 - Castor

Hi @dgcolby ,

 

You can use data cleansing tool to remove any digit from your cells. 

 

fmvizcaino_0-1573581491832.png

 

See if that works for you.

 

Best,

Fernando Vizcaino

luizcarlosj
5 - Atom

Hello!

You can use the Formula tool by creating a new column with the following expression: Right ([Data], 1)

 

Following are some images as an example.

 

formula1.JPGformula2.JPG

 

I am also sending the workflow.

 

 

Regards,
Luiz Amorim

CailinS
Alteryx
Alteryx

You could also use the Regex Tool which has a bit more nuance and allows for a more...stringent rule than 'right()'. For instance, keep only the 4th character if it is a *letter* (something like "...(\u)" which would return null for anything that didnt have a patter of . (single character) . (single character) . (single character) \u (uppercase letter).

Cailin Swingle
Customer Experience
JuanPortugal
5 - Atom

Hello!

 

If the data size is standard, you can use the tool "Formula" and use the "Substring" command, as in the images sent.

 

Substring_Alteryx_Community.PNG

 

 

I am also sending the workflow.

 

 

Regards,

Juan Portugal

Labels