Tableau Vis - Intersection Filter

Intro

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.

client product
A a
A b
A c
B a
B c
C a
C b
D c
E b
E c

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 of Intersection Filter

  1. Create Calculation Field [# Product]
    TOTAL(COUNTD([Product]))
    Compute using: Table Down

  2. Create Calculation Field [# Product Selected]
    TOTAL(COUNTD([Product]))
    Compute using: Client

  3. Duplicate [Client]
    place [Client (copy)] to Marks as Dimension

  4. Create Calculation Field [intersection filter]
    [# Product] = [# Product Selected]

  5. Place [intersection filter] to Filters panel and select True.

Tableau Vis - Intersection Filter_第1张图片

Put Sheets to Dashboard

Click here to view the Tableau example.

Tableau Vis - Intersection Filter_第2张图片

你可能感兴趣的:(数据可视化)