Alteryx Designer Desktop Discussions

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

How to Trim the string data and paste in different columns based on a specific rule?

madhurinani
8 - Asteroid

Hello All,

I have the data in below format:

 

Column 1Column 2
test 1Name: abc, brand: kia, type: EV, color: blue
test 2Name: xyz, brand: bmw, type: EV, color: white
test 3Name: qwe, brand:audi, type:gas, color: red

 

I would like the output as follows:

Column 1Namebrandtypecolor
test 1abckiaEVblue

 

Some of the column headers might not have the colon(:) and might just be "Name abc". For this I think I might need to create a specific rule for that.

 

Is that something that can be achieved in Alteryx?

Any help would be appreciated.

 

Thanks! 

22 REPLIES 22
binuacs
20 - Arcturus

@madhurinani Updated the workflow based on your new input

binuacs_0-1671575414442.png

 

madhurinani
8 - Asteroid

Hello @binuacs ,

Thank you for your workflow.

If suppose the Number column has dashes(-) between the numbers. How will that work?

Example: 123-456-789 instead of 123456789

 

I think there needs some tweaking on the regex formula you added, right?

 

Thanks!

binuacs
20 - Arcturus

@madhurinani you need to use the ReplaceChar() function to replace the _ to ''

 

binuacs_0-1671661313684.png

 

Labels