We are celebrating the 10-year anniversary of the Alteryx Community! Learn more and join in on the fun here.
Start Free Trial

Alteryx Designer Desktop Discussions

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

How would you compute? use macros? how?

amruta
8 - Asteroid

If I am given multiple food products. The quantities varies in lbs (less than 10) What I have to solve for is always fill up the boxes to fullest i.e.10 lbs. The boxes can be left partial (less than 10) only if there is no other option, else try to fill up to fullest. See trial workflow and sample input data attached and expected output.

assumption - do not mix different food types.

amruta_0-1648861241735.png

 

2 REPLIES 2
Qiu
21 - Polaris
21 - Polaris

@amruta 
It is a very interesting one.
I chose to use the function of Equal Sum of Tile Tool, actually I dont have other ideas.

First I calculate the max boxes required then use it as a parameter for "Number of Tiles".

This is also first I tried with 2 control parameters in a Batch Macro.

0402-amruta.PNG0402-amruta-1.PNG

amruta
8 - Asteroid

@Qiu Thank you so much for taking time to respond. 

Yes it is very interesting one. Calculating NumberofBox works perfectly. I think the smart tile as well does the job but not efficiently. In below example, instead of leaving the box-2 at 9lbs, I would like to use it to the fullest, so basically use the 1lb from 6th box. Similar make box-3 to 10lbs total. Box 4 and 5 are not 10 but 9lbs, but thats okay if there is not other option available. So when I fill up the first 5 boxes to the fullest, I will be only left with 4lbs in 6th box which is less than 50% so which I may end up cancel shipping or flag box-6 to review before ship. The smart tile will not fill up to the fullest, is there any other approach can you think of? I really appreciate your help.

 

amruta_2-1649097508270.png

 

 

Labels
Top Solution Authors