Alteryx Designer Desktop Discussions

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

Divide the data into 2 set

ravikumar060987
8 - Asteroid

I have dataset which contains 100 rows of records. I need to split / divide into 50 and 50 records (i.e., first 50 records and last 50 records). How can I do it in Alteryx?

I unable to get the correct output using 'Sample' tool. Please help.

3 REPLIES 3
ShankerV
17 - Castor

Hi @ravikumar060987 

 

Please make use of the record ID tool.

Then filter based on record ID.

 

The F and  T node will have 50 items each as 2 different datasets for you.

DataNath
17 - Castor
17 - Castor

Hey @ravikumar060987 the sample approach you mentioned should work - you just need 2 streams. The first you'll sample the First N, where N = 50 & the second, you'll Skip First N, again where N = 50. Here's a quick example where I've generated 100 rows:

 

DataNath_0-1677160540446.png

 

1-50 in the first Sample:

 

DataNath_1-1677160562706.png

 

51-100 in the second Sample:

 

DataNath_2-1677160575189.png

 

And the 2 outputs:

 

DataNath_3-1677160609943.png

 

You can also do this in a single Output Data tool. Just set the Max Records Per File to 50 and Alteryx will automatically generate multiple:

 

DataNath_4-1677160757040.pngDataNath_5-1677160764897.png

ShankerV
17 - Castor

Hi @ravikumar060987 

 

Please find a sample usecase to for your scenario.

 

ShankerV_0-1677160664748.png

 

Many thanks

Shanker V

Labels
Top Solution Authors