Using Sets To Show Customers Who Bought a Product Also Bought Other Products

Published: 11 Jan 2021
Last Modified Date: 14 Jan 2021


How to show that customers who bought a certain product also purchased other products.


  • Tableau Desktop


Step 1: Build the original view
  1. Add Customer Name and Sub-Category to Rows.
  2. Add Sales to Columns.
  3. Click the Sort button to sort the Sum of Sales.
Step 2: Create the set
  1. Right click Sub-Category, select Create > Set...
  2. Select the items to be analyzed. 
  3. Add Sub-Category Set to Filters card.
  4. Right Click Sub-Category Set in the Filters card, select Show Set.
Step 3: Create the filter
  1. Create the following calculation field filter
    {fixed [Customer Name]:max(if [Sub-Category Set] then "include" end)
  2. Add the calculation field filter to the Filters card, select "include" and click OK.
  3. Delete Sub-Category Set from the Filters card.
Now selecting from the Sub-Category Set values can filter out the customers that have bought from the Sub-Category while showing the other Sub-Categories the customer bought.
Did this article resolve the issue?