Alteryx Designer Desktop Discussions

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

Duplicating lines of data based on a count value in that entry

Jack_Nelson
7 - Meteor

I'm attempting to parse data based on a count variable on each line for machine cycle times. In this situation, one data entry doesn't necessarily attribute to one cycle. Rather, a data entry can contain anywhere from about 1 to 4 cycles where the time between datestamps is averaged out over the number of cycles that entry contained. I would like each cycle to be its own line with a cycle time value so I can create an accurate time series plot to analyze trends. Would there be a way to loop each entry to create another under it until n-1 = gap?

-----EXAMPLE DATA-----
Datestamp                   CycleTime   Gap
1/9/2017 2:00:13 PM   5.2               2
1/9/2017 2:00:29 PM   5.0               0
1/9/2017 2:00:34 PM   5.4               1

-----DESIRED OUTPUT-----
Datestamp                   CycleTime
1/9/2017 2:00:13 PM   5.2               

1/9/2017 2:00:13 PM   5.2               

1/9/2017 2:00:13 PM   5.2               
1/9/2017 2:00:29 PM   5.0               
1/9/2017 2:00:34 PM   5.4               

1/9/2017 2:00:34 PM   5.4               

3 REPLIES 3
MarqueeCrew
20 - Arcturus
20 - Arcturus
Check it the generate rows tool. It will be your Alteryx magic. I'm boarding a flight now. I'll check to make sure that you get this figured out.
Alteryx ACE & Top Community Contributor

Chaos reigns within. Repent, reflect and restart. Order shall return.
Please Subscribe to my youTube channel.
patrick_digan
17 - Castor
17 - Castor

@Jack_Nelson Attached is what @MarqueeCrew is suggesting. Let me know if you have any questions! Here is how the Generate Rows Tool would be setup: 

 

Capture.PNG

 

The help file for the Generate Rows has several good examples.

Jack_Nelson
7 - Meteor

@patrick_digan & @MarqueeCrew

 

Alteryx magic indeed!! Thanks for the help.  I'm still somewhat of a novice and learning all the tools, surprised I didn't stumble upon this one!

Labels