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

Endswith Calculation

ashleyinman
8 - Asteroid

I'm looking to replace GM400168(75) to only show GM400168

 

I've tried using the formula below. 

IF ENDSWith([Name], '(75)')
THEN "" ELSE [Name] ENDIF

 

But the calculation is not working. Any ideas how to adjust this?

2 REPLIES 2
BrandonB
Alteryx
Alteryx

Just set the formula to

 

Replace([Name],"(75)","")

CharlieS
17 - Castor
17 - Castor

I recommend the following if statement so only '(75)' strings that occur at the end of the string are replaced (and not '(75)' that occurs anywhere else).

 

IF Right([Name],4)=='(75)' THEN Left([Name],Length([Name])-4)
ELSE [Name] ENDIF

 

Labels
Top Solution Authors