Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

Parse values at end of text field from Right to Left

hellyars
13 - Pulsar

This is primarily a RegEx question.  FIELD_1 is start point.  The fields to the Left of FIELD_1 are the desired output.  

 

I know how to separate ITEM #  from TEXT and extend it down until the next ITEM #.  

 

How can I parse the dollar values from FIELD_1 and assign them to BUDGET, NEW_BUDGET, and CHANGE.   Reading FIELD_1 from RIGHT to LEFT.   The first value = CHANGE.  Two values = CHANGE and NEW_BUDGET.  Three values = CHANGE, NEW_BUDGET, and BUDGET.

 

 

FIELD_1ITEM #TEXTBUDGETNEW_BUDGETCHANGE
1 Specialized Roubaix Pro 82000 8200011 Specialized Roubaix Pro08200082000
Production increase 820001Production increase0082000
2 Cervelo R5 742998 738798 -420022 Cervelo R5 742998 738798 -4200742998738798-4200
New carbon seat post -42002New carbon seat post -420000-4200

 

2 REPLIES 2
hellyars
13 - Pulsar

I made some progress.  I used ReverseString to flip FIELD_1.  I then used the following RegEx expression to parse the values from the beginning text.  I then used ReverseString on the two RegexOut fields to return the text and values to their original values.  Now, I just need to parse the values from R to L and align with the CHANGE, NEW_BUDGET, and BUDGET fields.

 

(^.*?)\s([A-Za-z].*$)

 

hellyars
13 - Pulsar

Okay, I solved it.  The final step was to simply use a Text to Columns tool using \s as the delimiter and the output to 3 fields.  The 3 output fields exactly corresponded to CHANGE, NEW_BUDGET, and BUDGET.  I definitely made this harder than it needed to be.

Labels