Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

How to extract some specific data from within a data point using a formula?

Hopps
6 - Meteoroid

Hi. I have a set of data that has some duplicate descriptions with identical Product Codes, but the Unit data is different on some items when it comes to 'Pack Size'- see attached. 

 

How would I set up a formula to separate/pull out the 'Pack Size' column into the 1st number (Boxes) and the 2nd number (Units)? So that I can summarize all data in Units.....

 

Material IDMaterial DescriptionPack SizeSum_Invoice Receipt Quantity
167115Chocolate Celebrations Tub 650g1 x 1 EA128
167115Chocolate Celebrations Tub 650g1 x 4 EA1092
58307Gum Chewing Peppermint Extra Wrigleys36 BOX x 30 EA68
3 REPLIES 3
estherb47
15 - Aurora
15 - Aurora

Hi @Hopps 

 

I'd use a combination of Data Cleansing (to remove the text from the Pack Size column) and RegEx to parse the numbers into two columns, and ensure they are numbers.

image.png

 

Data Cleansing configuration:

image.png

 

RegEx configuration (save the numbers, ignore the spaces):

 

image.png

 

Let me know if that works for you.

 

Cheers!

Esther

Hopps
6 - Meteoroid

Perfect!! Thankyou......................had a few pesky commas in data further down, but just went back in and got the cleanser to remove punctuation as well.......bingo. 

I must learn to think further out of the box than formulas in this tool 🙂

estherb47
15 - Aurora
15 - Aurora

@Hopps 

 

So glad it worked!!!

 

I find that thinking in patterns helps when cleaning and parsing data, especially when Alteryx makes it so easy to work with patterns!

 

Cheers,

Esther

Labels
Top Solution Authors