Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.
SOLVED

String function to remove the last character.

Ghosh
7 - Meteor
Is there a way, using String Functions, to remove the 'T' from "Wheat FarmingT" (no double quotes)? Note: Not all fields have T in the end only a few. If string function isnt possible, could any please suggest a regex for this? Example: Column name: Agriculture, Forestry, Fishing and Hunting Data is Wheat FarmingT where T is actually in a form of "to the power". Thank You.
3 REPLIES 3
JoeS
Alteryx
Alteryx

Hi @Ghosh 

 

You'll want to use the below function:

 

 

Substring([Field1],0,length([Field1])-1)

 

 

Which starts at the beginning of the field then goes on for the length of the field minus 1

 

If it is only one character?

 

Ghosh
7 - Meteor

thank you for your reply and it helps.

 

Although I found out that there was an extra "Space" after the data in the fields. So I used 2 TrimRight functions to get them out.

 

Will make another copy of the data with your provided solution,

 

 

JoeS
Alteryx
Alteryx

Great stuff, could just leave the trim in as well, in case the data has it again in future.

 

 

Labels