3 Replies Latest reply on Aug 22, 2016 11:53 PM by Bree Lloyd

# Creating a Set of customers off a Product Line

Hello Fellow Tableauers

I'm rather sure many of you have already solved the best way to do this... I haven't yet so I figured i'd reach out and ask.

I'm looking at a list of customers and all the products they have.

I'd like to be able to isolate all customers who have a homeloan (whilst keeping all their other products as well).

I'd like to create a set of these Customers.

Any time I try to create a set, i just get all homeloans. Not all customers who own at least 1 homeloan.

If I was doing this in SQL, I'd probably use a CTE or a Volatile table (for those Teradata users) and left join it into my main set.

I can't seem to get that to work in Tableau.

Does anyone have a tried and tested strategy to work around this that I might try?

• ###### 1. Re: Creating a Set of customers off a Product Line

Hello Bree,

I create a sample workbook using Supermarket sample data.

In this sample, imagine Staple is Homeloan.

Regards

• ###### 2. Re: Creating a Set of customers off a Product Line

You can do this in a few ways, here's one method using Level of Detail calculations. First create the LOD to get a fixed level count on the number of home loan products for each customer;

HomeloanCount=  {FIXED [Customer Name]: COUNT(IF Category = 'Home Loans' then [Category] end)}

Then right click your customer name dimension, select create, set. Click the condition tab and enter the formula SUM([HomeloanCount])>0

• ###### 3. Re: Creating a Set of customers off a Product Line

Thank you very much, Tom.

This worked for me!