Alteryx designer Discussions

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

Split line break into rows

7 - Meteor

 

Hi everyone, 

How do I split this into multiple rows:

 

NameAsset
Apple[sign on]Orange Database
DFW - gfwac.dsau
DIO - frosds.hss
CDC - adreirs

 

So I want to split each line break into separate rows. Also, would like to get rid of anything in the bracket so my final result looks like this.

 

NameAsset
AppleOrange Database
AppleDFW - gfwac.dsau
AppleDIO - frosds.hss
AppleCDC - adreirs

 

Many thanks in advance.

Highlighted
Alteryx Certified Partner

Hey bb,

 

A text to columns will help you greatly here.
Just split to rows on a "\n" and on "asset"

 

I've attached the workflow

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

Use Text to Columns tool with the delimiter set to \n (the reference for the newline character) and configure the tool to split to rows instead of columns. That will take care of the first request. 

 

To eliminate the bracketed text, here's an expression that can be used in a Formula tool on the [Asset] field: The idea is that it identifies the brackets (and anything between) and replaces it with nothing, effectively removing it.

REGEX_Replace([Asset],"(\[.*])","")

Highlighted
Alteryx Certified Partner

REGEX_Replace([Asset],"(\[.*])","")

Nice call @CharlieS missed the 2nd ask!

 

Labels