Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Split line break into rows

bb
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.

3 REPLIES 3
JordyMicheal
11 - Bolide

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

CharlieS
17 - Castor
17 - Castor

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],"(\[.*])","")

JordyMicheal
11 - Bolide

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

Nice call @CharlieS missed the 2nd ask!

 

Labels