em456
em456

Reputation: 433

2 dimensions on same axis Tableau

I am trying to plot 2 dimensions into a bar chart. So I have data that looks at what products customer buy there are 5 different types of product and I have them from 2 different stores. so the data looks like which are stored in 2 different excel files.

Store 1
customer_ID product
1           apple
1           orange
2           apple

Store 2
customer_ID product
1           apple  
1           orange 
2           pear

I'd like to be able to be able to have product on the x axis and then count on the y axis. with the 2 different stores in different colours. Is it possible to do this in Tableau or do I need to rearrange my data into 1 table that is like

customer_ID product store
1           apple   1
2           orange  2

Upvotes: 0

Views: 548

Answers (1)

AnilGoyal
AnilGoyal

Reputation: 26238

You can do this in tableau indeed. I have created two excel files named Store1 and store2 with sample data.

You should do like this

Import first file in Tableau. Thereafter, double click New Union button

enter image description here

In the WildCard dialog type Store*.xlsx

enter image description here

Your Union is created automatically, with file name enter image description here

You can now easily proceed to create a view as desired. In case of any problem further, do tell me.

enter image description here

Upvotes: 1

Related Questions