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.

clientproduct
Aa
Ab
Ac
Ba
Bc
Ca
Cb
Dc
Eb
Ec

image

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.

image

Put Sheets to Dashboard

Click here to view the Tableau example.

intersection filter

  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值