SOLVED
String function to remove the last character.
Options
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Ghosh
7 - Meteor
‎12-12-2019
05:42 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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.
Solved! Go to Solution.
3 REPLIES 3
JoeS
Alteryx Alumni (Retired)
‎12-12-2019
05:55 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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?
‎12-12-2019
06:12 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
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 Alumni (Retired)
‎12-12-2019
06:39 AM
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Great stuff, could just leave the trim in as well, in case the data has it again in future.
