Join the Alteryx Community’s Maveryx Summer Cup event! Compete, network with others, and earn your gold through a series of challenges from July 24th to August 11th. Learn more about the event here.

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