3 Replies Latest reply on Jun 15, 2016 3:02 PM by Tom W

# Can I filter for only Customers who have purchased in both of my sales channels?

I have attached a dummy Excel spreadsheet - I have net demand by unique customer number and channel. Some customers have only purchased in one channel but some have purchased in both. Can I filter by or create a calculated field or set to see only omnichannel purchasers?

• ###### 1. Re: Can I filter for only Customers who have purchased in both of my sales channels?

Hi Mackenzie,

A Tableau Packaged Workbook is the preferred method of sharing your sample around here.

You could filter on customers with purchases in both channels by creating a calculated field as follows;

SUM(ZN(IF Channel = 'Direct' then [Net Demand] END) + SUM(ZN(IF Channel = 'Store' then [Net Demand] END) > 0

If that field returns true, you have Net Demand > 0 in both channels

• ###### 2. Re: Can I filter for only Customers who have purchased in both of my sales channels?

Apologies on the workbook. I am trying to attach the correct format now.

I tried the calc field you suggested and when I added and filtered by it, nothing happened. It let me filter by true only, so perhaps I did something incorrectly.

• ###### 3. Re: Can I filter for only Customers who have purchased in both of my sales channels?

My formula was very incorrect. You want to test that BOTH sums are greater than zero, not the combined sum!

sum(ZN(IF [Channel]='Direct' THEN [Net Demand] END)) > 0

and

SUM(ZN(IF [Channel]='Store' THEN [Net Demand] END)) > 0

Drag that onto the filter and remove Channel from the rows shelf.