Reputation: 45
I use Tableau Public. The goal is to show the distrbution of fruits in different locations using pie charts.
The source excel file contains:
column 1: location_name
column 2: Lon
column 3: Lat
column 4: apples
column 5: bananas
column 6: oranges
I put the lon and lat in rows and columns, with the location_name in the Details, and I get points of the locations. Then, I'm not able to present the fruits data together in a pie chart format.
Thank you for your help
Upvotes: 0
Views: 62
Reputation: 11921
The easiest way is to use Tableau’s pivot feature to effectively reshape the data to have these columns: Location, Lat, Lon, Fruit, Amount
So each row in the original data set will be transformed into three rows in the pivoted version. Then visualizing the data will be much easier.
You can select columns to pivot on the Data Source page. See the help documentation on Pivots if you have trouble. You can also pivot in Tableau Prep.
If your data is sparse, say if several locations don’t produce all three types of fruit, you can often improve efficiency by adding a data source filter after pivoting to remove the rows with null Values — null Amounts in your case.
To place Pie charts at each location. Choose the Pie Mark Type, and put:
Adjust size, colors, border to taste. Add fields to the Label shelf as desired
Upvotes: 1