Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
解決済み

Checking if Field Value Ends in Letter

workinghardly
メテオロイド

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件の返信2
Claje
マグネター

Hi,


Try the following formula, based on your example

IF ENDSWITH(Animal,'R') THEN 'R'
ELSE 'D'
ENDIF
workinghardly
メテオロイド

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

 

ラベル