delete a leading 1 in a phone number column
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Day 6 with Alteryx, so super newby here. I have a column in which SOME phone numbers have a leading 1 and some do not. I need to get rid of the leading 1s. Any suggestions?
Solved! Go to Solution.
- Labels:
- Common Use Cases
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Hi @tpostlewate ,
There are many ways to do it. If you want to remove all leading 1, you can use the following formula in a formula tool
TrimLeft([Your field with phone numbers],"1")
Note that your phone numbers field should be a string for this to work.
Hope that helps, let me know if it worked for you.
Regrds,
Angelos
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
There are a couple of ways to do this, but I think the easiest would be to do a conditional formula with a count. If the length is larger than 10 numbers, you know there is a leading 1. You can then trim the first digit with a right formula.
if Length([Field1]) > 10
then right([Field1],10)
else [Field1]
endif
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Notify Moderator
Awesome! Thank you guys. I used the formula and there are no leading 1s to be seen! I've been slaving on that all day.
