We are updating the requirements for Community registration. As of 7/21/21 all users will be required to register a phone number with their My Alteryx accounts. If you have already registered, you will be prompted on your next login to add your phone number.

Alteryx Designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.

How to disperse records

8 - Asteroid


I have a file with a large number of sales orders that I have to integrate into my ERP.
ERP loads orders 10 y 10, but cannot simultaneously load 2 orders from the same customer.

=> How can I disperse the orders, to minimize the risk of having 2 orders from the same customer that follow each other?


I tried adding a new column randint(1000000000) and sorting on it but it is not sufficient.


Attached a sample file

15 - Aurora
15 - Aurora

Hi @NicolasFabre81 ,


you could sort by customer in a first step, then use a Multi-Row Formula tool and add a "count" to the orders grouped by customer and then sort by count. This would ensure, that orders of the same customers do not follow each other (if file does not only contain orders of one customer). Does this solve your problem? See attached sample workflow


Best regards



13 - Pulsar
13 - Pulsar

Hi @NicolasFabre81,


I have built an iterative macro to do so, what it does is that it takes first 10 records and then cound the number of times a customer appears, if it appears more than once, then it exclude it and make run through the workflow again. The only drawback I can see s that you might not have full files of 10 records!


Hope it helped!