您的位置:首页 > 其它

Tableau Vis - Intersection Filter

2016-06-09 22:23 288 查看

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.

clientproduct
Aa
Ab
Ac
Ba
Bc
Ca
Cb
Dc
Eb
Ec


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

Create Calculation Field [# Product]

TOTAL(COUNTD([Product]))

Compute using: Table Down

Create Calculation Field [# Product Selected]

TOTAL(COUNTD([Product]))

Compute using: Client

Duplicate [Client]

place [Client (copy)] to Marks as Dimension

Create Calculation Field [intersection filter]

[# Product] = [# Product Selected]

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



Put Sheets to Dashboard

Click here to view the Tableau example.



内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签:  tableau