Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Andy Uttley, Alteryx ACE, makes music with Alteryx | Math + Music
SOLVED

How to write to a new file if Record ID is above a certain number?

Highlighted
8 - Asteroid

So I have a Batch Macro where I have an unknown number of records. If I have above X number of records I need to take all the records above X and put them into a different sheet. For example:

 

1A
... 
10B
11C

 

What I need is for the Records from 1 to 10 to go to one sheet and then all the records above 10 to go to a different excel file. How could I do this?

Highlighted
Alteryx
Alteryx

Can you use a filter tool where record ID <= 10

 

This would put the records 1-10 through the True and the 11 onward to the False. You could then connect this to another output data tool. 

 

Alternatively, you could use a formula tool that creates a new column called Sheet and say IF Record ID <=10 then "First Sheet Name" ELSE "Second Sheet Name". Then in the output data tool you could check the box at the bottom to take File/Table name from field and use this new sheet name column with the option Replace File/Table name. This would use the value in this new column that you created to generate sheets for the data that corresponds to these values. 

Highlighted
Alteryx
Alteryx

Example mock up

 

dynamic.png

Labels