Bring your best ideas to the AI Use Case Contest! Enter to win 40 hours of expert engineering support and bring your vision to life using the powerful combination of Alteryx + AI. Learn more now, or go straight to the submission form.
Start Free Trial

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.

 

Labels
Top Solution Authors