Pie Chart in Tableau

Pie Chart in Tableau is useful to display the Sales by region, Countrywide customers, Sales by Country, etc. Pie Charts are also helpful in the dashboard design. We can use the Tableau pie chart to display Country wise sales, and then use the Action filters to drill further down. In this article, we show how to Create a Pie Chart in Tableau with an example. For this, we are going to use the Data Source we created in our previous article.

Please visit Data Labels in Tableau Reports article to understand the Tableau Data Source. If you want the Custom SQL Query Only for this report, then use the following query as your SQL Server Data Source

SELECT Geo.[EnglishCountryRegionName] AS [Country]
      ,Geo.[StateProvinceName] AS [State]
      ,SUM(Cust.YearlyIncome) AS YearlyIncome
      ,SUM(Fact.SalesAmount)AS SalesAmount 
FROM  DimCustomer AS Cust
  INNER JOIN
      FactInternetSales AS Fact ON 
 Cust.CustomerKey = Fact.CustomerKey
 INNER JOIN
     [DimGeography] AS Geo ON
   Cust.GeographyKey = Geo.GeographyKey
 GROUP BY Geo.[EnglishCountryRegionName],Geo.[StateProvinceName]

Create a Pie Chart in Tableau Approach 1

First, Drag and Drop the Sales Amount from Measures Region to Columns Card. Since it is a Measure value, the Sales Amount will aggregate to Sum(default). Next, Drag and Drop the English Country Region Name from Dimension Region to Rows Card. Once you drag them, the following screenshot will be displayed.

Pie Chart in Tableau 2

Now we have to change the default Bar chart to Tableau Pie Chart using the Show Me option. Please expand the Show Me window and select the Pie Chart from it as shown below

Pie Chart in Tableau 3

Once you select the Pie Chart from Show Me window, Pie Chart will display with default colors

Pie Chart in Tableau 4

Please use the Size option in Marks Card to expand or Shirk the Pie chart in Tableau

Pie Chart in Tableau 5

If you observe the above screenshot, the Tableau Pie chart is providing the perfect results. However, we are unable to identify the difference between Sales in France and Sales in Germany. To resolve these situations, We have to display the Data Labels.

Add Data labels to Pie Chart

To add data labels to Tableau Pie chart, Please drag and Drop the data Label values from Dimension or Measures Pane to Label option in Marks Card.

Pie Chart in Tableau 6

In this example, We want to display the Sales Amount as Data labels so, Drag and Drop the Sales Amount from Measures region to Labels option

Pie Chart in Tableau 7

Tableau allows us to add Multiple Measure values as Data Labels. It can be handy when you want to compare the Total Sales against the Profits by Region. To do this, use the above technique to place the Yearly Income

Pie Chart in Tableau 8

Format Pie Chart in Tableau

One of the most common questions raised by any developer is formatting Tableau Pie Chart. Because the Default colors or Default Pie Chart pallet may or may not be attractive to the end-user. To do this, Please select the Edit Colors.. option from the context menu as shown below

Pie Chart in Tableau 9

Once you choose the Edit Colors.. option, a new window called Edit Colors will be opened to select the Color Palette for English Country region name. For demonstration purpose, we are choosing the Color Blind 10

Pie Chart in Tableau 10

Click the Apply button and then click OK to finish it

Pie Chart in Tableau 11

Create a Pie Chart in Tableau Approach 2

This method is very easy and straightforward. First, Please select the Pie option from the drop-down list present in Marks Card

Pie Chart in Tableau 12

Next, Drag and Drop the Sales from Measures Region to Filed region, as shown below.

Pie Chart in Tableau 13

Next, Drag and Drop the English Country Region Name from Dimension Region to Color option in Marks Card.

Pie Chart in Tableau 14

Once you drag them, the following screenshot will be displayed. Hope you understood, How easy, it is to design or create a Pie Chart in Tableau

Pie Chart in Tableau 15

Remember, Pie chart allows us to add both Dimensions and Measures as the Data Labels. To demonstrate this, We just placed the Sales Amount Measure and English Country Name on the labels Option present in Marks card

Pie Chart in Tableau 16

It is always advisable to use the Tableau Pie charts on High-level Data. For instance, If you use the same Pie Chart for State-wise sales rather than Country-wise, you will end up with the following screenshot. If you see carefully], we can’t even identify a few regions.

Pie Chart in Tableau 17