Alteryx Designer Desktop Discussions

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

Breaking embedded new lines from data frame

nlgenin
7 - Meteor

Hey Alteryx Gurus!

 

I'm new to Alteryx and I need you guys' help!

I have a file that has embedded lines within one single cell that may or not occur in two columns.

 

I need to break each embedded line in that way that I create new rows with each value and if the other column only has one value I'll bring it with the new row or if it has more than one value embedded it will bring it in order for the new rows.

 

The example will make it more clear:

 

My data frame:

TURBINE IDTURBINE TYPECURTAILED SECTORCUT OUT WINDSPEEDLOAD CASE
C-III-22.5-116

23-40

132-203

10

EXTREME LOAD

C-III-32.5-116347-012EXTREME LOAD
A-III-12.5-116

101-143

234-290

12

14

EXTREME LOAD
A-III-22.5-116

156-170

187-200

309-353

14

12

11

EXTREME LOAD

 

How I need the outcome to be:

 

TURBINE IDTURBINE TYPECURTAILED SECTORCUT OUT WINDSPEEDLOAD CASE
C-III-22.5-116

23-40

10

EXTREME LOAD

C-III22.5-116

132-203

10

EXTREME LOAD

C-III-32.5-116347-012EXTREME LOAD
A-III-12.5-116

101-143

12

EXTREME LOAD
A-III-12.5-116

234-290

14

EXTREME LOAD
A-III-22.5-116

156-170

14

EXTREME LOAD
A-III-22.5-116

187-200

12

EXTREME LOAD
A-III-22.5-116

309-353

11

EXTREME LOAD

 

I did text to column to new rows with \n as delimiter but it can only do with one column

Could you guys help me out?

thanks!!

2 REPLIES 2
Luke_C
17 - Castor

Hi @nlgenin 

 

Here's an example of how you could approach this:

 

  1. Add record IDs and transpose the columns you need to split
  2. Use the tile tool to further group/associate the split records (i.e. first sector to first windspeed)
  3. Crosstab it back to the expected format
  4. Use multi-row to fill in nulls (windspeed in this example)

 

Luke_C_0-1628103133711.png

 

 

nlgenin
7 - Meteor

Thanks, Luke! It did work

Labels