Advent of Code is back! Unwrap daily challenges to sharpen your Alteryx skills and earn badges along the way! Learn more now.
Free Trial

Alteryx Designer Desktop Discussions

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

Create New Rows Based on Values in a Single Row

bleu
8 - Asteroid

Hi,

 

I'm trying to create new rows based on data in an existing row. The best way to explain it is using an example:

 

Data comes in a spreadsheet all sorts of ways, mixed and matched:

Apple Batch 10-13          0.75

Apple Batch 15-18          0.15

Banana Batch 10-13       0.25

Pear Batch 20-23            0.00

Red Grape Batch 30-33  0.15

 

I'd like to get:

Apple Batch 10         0.75

Apple Batch 11         0.75

Apple Batch 12         0.75

Apple Batch 13         0.75

Apple Batch 15         0.15

Apple Batch 16         0.15

Apple Batch 17         0.15

Apple Batch 18         0.15

And so on and so forth

 

To make matters worse I have 9 types of fruit and 14 groups:

10-13

15 - 18

20 - 23
25 - 28
30 - 33
35 - 38
40 - 43
45 - 48
50 - 53
55 - 58
60 - 63
65 - 68
70 - 73
75 - 78

 

Any ideas or a link to where something like this was already posted would be appreciated!

 

 

4 REPLIES 4
Emil_Kos
17 - Castor
17 - Castor

Hi @bleu,

 

First what I needed to do is creating the data in a correct format. 

Regex was really good for that. 

Afterwards, the row generator did the work. 


The workflow:

 

Emil_Kos_0-1614955562478.png

 

The output:

 

Emil_Kos_1-1614955571531.png

 

 

bleu
8 - Asteroid

OK, I never would have thought to do something like that. This is exactly what I want. Thank you Emil_Kos!!

🙂

Emil_Kos
17 - Castor
17 - Castor

Hi @bleu,

 

No worries. I am happy that I could help 😀

StellaBon
11 - Bolide

I have a similar situation. If one of the fields contains, for example, the number "4", how could I generate 4 rows that contain all of the information from that one row but label the new records with [record id]-1, [record id]-2, [record id]-3, [record id]-4? I'm unsure since my example has no start number and end number.

Labels
Top Solution Authors