We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

Find string occurring multiple times within a string

winnie
6 - Meteoroid

I have a string which is a list of products with the value of each product in brackets and I want to get a total order value

 

String would be something like

Product 1 ($10.00) / Product 2 ($7.50) / Product 3 ($87.50) / etc

 

If I do text to columns on "/" then I'm left with the product and value in separate columns.

 

I'd like to find the string inside the brackets and then be able to sum all of these values.  Does anyone have any ideas?

I don't really want to do 7+ text to columns on each product on "(" or "($" and then get rid of the end bracket and then sum all that up since it's quite a messy way to do it and I'd have 20+ columns before getting rid of the excess fields.

2 REPLIES 2
jdunkerley79
ACE Emeritus
ACE Emeritus

If all you want is the total in each bracket, I suggest you add a record ID, then use RegEx tool to parse the value. Something like:

\(\$([0-9\.]+)\)

Will extract the value and then you can link to a summarise tool to create totals.

 

2016-04-20_12-59-22.jpg

 

Sample attached

 

winnie
6 - Meteoroid

yeah that's brilliant, thanks!

Labels
Top Solution Authors