Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Announcement | We'll be doing maintenance between 9am-11am MT on Saturday, January 25th, which may impact your experience. Thanks for your patience as we work on improving the community!

How to remove certain characters from end of string


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



Try this formula.
IIF(Right([string],1)="T", Left([string],Length([string])-1),[string])



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


TrimRight([Field1], 'T')