简体   繁体   中英

Tableau - Count customers with product pairs

Tableau question

How can I count unique number of customers who have product pairs.

I have a dataset with customer id and product.

Sample dataset

1

I need to look like this! with count of customers in a product pair matrix

Result View

2

Final goal is to create heatmap of product bundle popularity

Ok. I think you need to reshape your data in tableau prep or in any other programming language. What I have done is like that - Add a new column in data like this -

新栏目

Thereafter use pivot_wider (rows to column) function in tableau prep (this functionality is not yet available in tableau desktop) on cols Prod and Prod2 which will transform your data like this -

转换后的数据

Thereafter you can make a heatmap in tableau desktop like this

热图

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM