2 Replies Latest reply on Jun 16, 2017 4:47 AM by Tushar More

Evenly distributed groups

Hey!

Let me start by explaining the data structure and the goal.

I work in lead generation, and I have a list of customers that are able to handle varying amounts of leads per month -- anywhere from 1 to -- but I will be ignoring the infinites for this calculation. We sell leads to a maximum of 4 customers, giving us a one-to-many relationship.

The question I'm trying to answer is this: How many leads can we sell to 4, 3, 2 and 1 customer(s) respectively. This is to avoid "overselling", since selling to only 2 customers is usually unprofitable.

I've attached a mock up illustration of what I'm attempting to achieve below.

Imagine that the bars represent individual customers, and the height of the bars represent their capacity in number of leads.

In this example we get the answer 75 leads to 4 customers, which equates to (75*4) = 300 deliveries. An additional 5 can be sold to 3 customers, and the last 20 can only be sold to 1.

I'm looking to solve this either in Tableau, if possible, or through SQL operations.

*not to scale

bump!

• 2. Re: Evenly distributed groups

Hi Signar,

Not sure but this is something I created in Tableau.

This shows how many customers are purchasing one,two, three and so on items in each region.

I used this calculation:

I think if you could do something like this, you will be able to get the result.

~Tushar