Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
There's still time to register for the Q3 ACE Panel - Spatial Edition presentation tomorrow! | Need more information about the event? Check out the post here

Fixed Width - starting from character 10

Highlighted
8 - Asteroid

H There,

 

I am trying to do a simple text to columns with fixed width and have viewed the answers on here but cannot find a reply that solves my question.

 

123456789ABCDEF

123456789ABCDEFGHIFJKDJKJKJ

 

In the example above I need to ignore the first 9 characters and select anything from the 10th character, there is not a fixed number of characters after the 10th it could be 5 it could be 50.  In excel I would do text to columns fixed width starting 10th character. How do I do this in Alteryx? I have tried using RegEX however I do not know what to put in the Regular expression.

 

Thanks

Jodi

 

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Try this:

Substring([Field], 10,)

 

The CORRECTED version of the code is:

Substring([Field], 10)

I originally answered the post while on my walk.  The substring function is zero-based and will pick up from the 11th character going forward if no length is specified.  This should be FASTER than a RegEx expression such as:

Regex_Replace([Field],".{10}(.*)",'$1')

It is also easier to explain.

 


That just might work for you.

Cheers,

Mark

Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and reboot. Order shall return.
Highlighted
ACE Emeritus
ACE Emeritus

Came here to recommend RIGHT([Field],LENGTH([Field])-10), left with new information about Substrings that are WAY easier.

 

Thanks as always Mark!

One minor detail - I think the second comma is not required and can cause parsing issues (or at least it does for me on an older version of Alteryx.

Highlighted
8 - Asteroid

Great thanks Mark, yes that worked, without the second comm.

Highlighted
8 - Asteroid

the second comma was not needed. Thank you!

Labels