Alteryx Designer Desktop Discussions

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

Checking if Field Value Ends in Letter

workinghardly
6 - Meteoroid

Hi,

 

I am trying to use a Formula to see if a field value ends in the letter 'R'. The values are varying lengths with a mix of characters (numbers and letters).  A new column will indicate if it does (R) and does not (D).

Something like this:

ANIMALR/D
DOG123D
CR123ATD
MOUSERR
COWD
BIR123DRR
OCTOPUSRR
FROXD
S456EALD
PEN54GUINRR
B23EARR
RFROGD
T REXD

 

Thank you.

2 REPLIES 2
Claje
14 - Magnetar

Hi,


Try the following formula, based on your example

IF ENDSWITH(Animal,'R') THEN 'R'
ELSE 'D'
ENDIF
workinghardly
6 - Meteoroid

Thank you very much. I did not realize there was ENDSWITH.

 

Polls
We’re dying to get your help in determining what the new profile picture frame should be this Halloween. Cast your vote and help us haunt the Community with the best spooky character.
Don’t ghost us—pick your favorite now!
Labels