问题描述
我正在尝试将2维绘制成条形图。因此,我有数据可以查看客户购买的产品,共有5种不同类型的产品,而我从2家不同的商店购买了这些产品。因此数据看起来就像存储在2个不同的excel文件中。
Store 1
customer_ID product
1 apple
1 orange
2 apple
Store 2
customer_ID product
1 apple
1 orange
2 pear
我希望能够在x轴上具有乘积,然后在y轴上进行计数。两家不同颜色的商店。是否可以在Tableau中执行此操作,还是我需要将数据重新排列到1个像这样的表中?
customer_ID product store
1 apple 1
2 orange 2