Important Community update: The process for changing your account details was updated on June 25th. Learn how this impacts your Community experience and the actions we suggest you take to secure your account here.

Alteryx Designer Desktop Discussions

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

Duplicating Data

Da_Norman
5 - Atom

Hello,

 

I need to duplicate my data in the exact format it is currently in my data set. Please see the following example

 

Original Data:

A
B
C

 

New Format:

A
B
C
A
B
C

 

Ideally I would be able to choose how many times this data is duplicated or set a limit for how many times it can duplicate. Please respond back with any potential solutions other than using the union to combine from my data source multiple times.

4 REPLIES 4
geraldo
13 - Pulsar

@Da_Norman 

 


an example workflow. you configure as many times as you want. click on the macro and the parameter appears

 

loop.JPG

Qiu
21 - Polaris
21 - Polaris

@geraldo 

I was thinkg also to use a interative macro.

Although the macro seems to be missing in your packed workflow?

geraldo
13 - Pulsar

 

@Da_Norman 

 


really he is not present grateful for communicating @Qiu 

Thank´s

danilang
19 - Altair
19 - Altair

Hi @Da_Norman 

 

I'm a big fan of NOT using macros if there is a simple way to accomplish the task without one.  Macros complicate the workflow and increase maintenance effort.  This is a case where a few tools can produce the results that you want.

 

 

Untitled.png

 

Here I add a RecordID and then a Group field set to 1.  The Generate Rows creates the requested number of groups.  The Sort orders as per the inpput and the final Select removes the RecordId and Group fields leaving only duplicates of your original data.

 

 

out.png

 

Dan

 

Labels