In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

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

Parsing comma from String and numbers

danielmorgan1
5 - Atom

Hello,

 

I have data sets similar to the following:

 

States

Total Cost 

Values

Texas

2,100

Food - Breakfast 500, Food - Dinner 1,200, Income (1,500), Rent - 1bdr apartment 1,800;

 

I am attempting to ensure the Values match up with the Total Cost. The end result would look something like the following. 

StateTotal CostCategoryValue
Texas2,1000Food1,700
  Rent1,800
  Income-1,500

 

Because of the comma in the numbers, it was difficult to utilize delimiters to separate the data. I need to keep the category (food, rent) before the dash. Is there a formula or tool that I can use to get rid of the comma in between numbers? 

4 REPLIES 4
alexnajm
19 - Altair
19 - Altair

This looks like a Text to Columns tool, split into rows!

danielmorgan1
5 - Atom

Text to columns doesn't work, due to a comma being in the number and outside of the number. I think I need to clean the data first, but I couldn't figure out how to use the replace function to capture this because the comma is either after the number (string in the data set) i.e: Dinner 1,200, or Parenthesis Income (1,500),

 

alexnajm
19 - Altair
19 - Altair

Exactly - this should work well then: 

danielmorgan1
5 - Atom

Thank you, the formula that you provided before the text to columns was exactly what I needed. Greatly appreciate the quick response and help!

Labels
Top Solution Authors