5 Replies Latest reply on Sep 11, 2017 6:18 AM by Joshua Cloud

# Count of customers with more than n orders, by country, in packed bubble chart

Hi Tableau gurus,

I have been breaking my head trying to solve this problem on a proprietary dataset. I have tried using the SuperStore dataset hoping that a simpler dataset would help, but to no avail. I've attached a packaged workbook.

In the parlance of the SuperStore dataset, I know that there are some customers that only have one order and others that have two or more Order IDs. I would like to count, by country, customer IDs that have 2 or more distinct Order IDs. For example, Customer ID 2 who lives in the US has only one order, and so I would not want to count that customer in the total for the US.

Once I know how many customers in each country have two or more orders, I'd like to display a packed bubble chart with country names and the multi-order customer count.

I've played around with various table calculations but can't get anywhere that makes sense. I'm sure it can be done! Thanks for any help you can provide.

CL

• ###### 1. Re: Count of customers with more than n orders, by country, in packed bubble chart

Cheril,

Try using this calculation on the sample data:

1 of 1 people found this helpful
• ###### 2. Re: Count of customers with more than n orders, by country, in packed bubble chart

This looks really awesome! However, I am stuck using Tableau 8.2 for this particular project. Do you have any other ideas?

• ###### 3. Re: Count of customers with more than n orders, by country, in packed bubble chart

I ended up solving my own problem using this blog post: Slicing by Aggregate | VizPainter .

I needed to first create a set of Customers that had more than one distinct order number, and then I could use that set as a filter. I had tried that, but I wasn't doing it right. I've attached the workbook with the solution.

• ###### 4. Re: Count of customers with more than n orders, by country, in packed bubble chart

Found your post while trying to find a List of Order ID that involve more than one Country.

Based on the original question of this post, should the calculation use COUNTD instead of COUNT?  Thx

• ###### 5. Re: Count of customers with more than n orders, by country, in packed bubble chart

yes