Get Inspire insights from former attendees in our AMA discussion thread on Inspire Buzz. ACEs and other community members are on call all week to answer!

Alteryx Designer Desktop Discussions

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

I need to create 5 groups with an equal number of records and an equal sum

CTRSME
5 - Atom

Hi Alteryx Community,

 

I am trying to create 5 groups of records with an equal number of records in each AND with an equal sum across the 5 groups (or as close as I can get to an equal sum). The markets contained in each group can be random. I have tried using the Multi-Field Binning tool and the Tile Tool but am not getting the desired solution.

 

For further context: I have a number of markets across England with a column showing total units consumed in each of those markets. I am looking to target marketing spend in 5 unique market groups with a similar sum of consumption to test which marketing approach works best.

 

I really appreciate any help I can get here!!

 

Thanks,
Caleb

4 REPLIES 4
IraWatt
17 - Castor
17 - Castor

Hey @CTRSME,

Your problem sounds a bit like the Knapsack Problem I'm having a look at Challenge #52: Solving the Knapsack Problem - Alteryx Community for inspiration. 

smoskowitz
12 - Quasar

Hi @CTRSME -- Sounds like a job for the Tile tool: https://help.alteryx.com/20221/designer/tile-tool

PhilipMannering
16 - Nebula
16 - Nebula

@IraWatt and @smoskowitz. Think this might be more tricky than it appears. The Tile Tool can do equal sum or equal records but not necessarily both. What about sorting ascending and assigning groups 1, 2, 3, 4, 5, 1, 2, 3, 4, 5, 1, 2, ... etc. Not an optimum solution, but perhaps close enough?

CTRSME
5 - Atom

I really appreciate everyone's response! As much as it would be great to have a perfect distribution, I think @PhilipMannering might have the simple solution that will work for now. I was going around in circles on this for ages so I really appreciate the simple solution! Thanks again for the help!!

Labels