Tableau Intersection Filter Tutorial
If you used Tableau before, you will know that the filters in Tableau are union/or selection.Let’s take the table below for example.
If you are going to create a filter and select product a & b, tableau will show client A,B,C and E instead of A,C. It’s because the filters will show us the list of clients who purchased product a or b, instead of product a and b.
the idea
Firstly, create a variable to count the selection of products. Then create another variable to count the selection of products from each client. If these two variable equal, it means that the clients purchased all products that we picked.
steps to construct intersection filter
- Step 1:
- Create Calculation Field [# Product]
- TOTAL(COUNTD([Product]))
- Compute using: Table Down
- Step 2:
- Create Calculation Field [# Product Selected]
- TOTAL(COUNTD([Product]))
- Compute using: Client
- Step 3:
- Duplicate [Client]
- place [Client (copy)] to Marks as Dimension
- Step 4:
- Create Calculation Field [intersection filter]
- [# Product] = [# Product Selected]
- Step 5:
- Place [intersection filter] to Filters panel and select True.
put sheets into dashboard
Click here to view the Tableau example.
Leave a comment