Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
The Expert Exam is now live online! Read about the specifics and what it took to bring it to life in the blog by our very own Elizabeth Bonnell!

How to remove certain characters from end of string

Highlighted
7 - Meteor

How do I remove certain characters from a string if and only if they are that character? For example:

 

I have a column with NAICs 3 Digit Titles that have a "T" inserted at the end of some cells but not all. How do I remove the "T" from ONLY the end of the string IF and ONLY if it is a "T"? To clarify, If there is not a "T" at the end of the string I want the string to remain the same. Also, I do not want to replace every "T" just the ones at the end of the string. 

 

NAICs 3 Digit Title
Professional, Scientific, and Technical ServicesT
Social AssistanceT
Sporting Goods, Hobby, Musical Instrument, and Book Stores
Real EstateT
Food Services and Drinking PlacesT
Specialty Trade ContractorsT
Merchant Wholesalers, Nondurable Goods
Furniture and Home Furnishings Stores
Real EstateT

 

 

Highlighted
12 - Quasar
Try this formula.
IIF(Right([string],1)="T", Left([string],Length([string])-1),[string])
Highlighted
11 - Bolide

@Joshua_Bova,

 

I think you should just be able to use the formula:

 

TrimRight([Field1], 'T')

 

Best,

MSalvage

Labels