Alteryx designer Discussions

Find answers, ask questions, and share expertise about Alteryx Designer.
Check out our powerful new search update! You can read more here. Please let us know if you have any feedback by creating a topic here.

How to disperse records

Hello,


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

Highlighted
Alteryx Certified Partner
Alteryx Certified Partner

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

 

Roland

Highlighted
Quasar
Quasar

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! 

Labels