The skills learned creating a pie chart in Tableau are directly relatable to many other types of visualizations. We’ll explain how to create a pie chart in Tableau along with how to setup a number of additional formatting options like adding data labels and category coloring that are applicable to a number of other visualization types.
Tableau is one of the premier business intelligence tools on the market today. It has an almost countless number of features making it highly flexible but also complicated to learn all of the different things it’s capable of. Learning how to setup pie charts is a great place to start learning some of the most widely used features.
Let’s jump in!
Table of Contents
When to Use Pie Charts in Dashboards and Reports
Pie charts are often criticized for being overused and sometimes misleading but continue to be a staple in reporting dashboards. When used appropriately, pie charts can be an effective tool for conveying information in a clear, concise manner. They’re quick for report viewers to undersatnd at a glance.
Some of the best use cases of pie charts include the following:
- Representing part-to whole relationships – Pie charts excel at presenting information such as market share by product or sales across regions.
- Comparing limited numbers of categories – Pie charts lose their ability to convey information when there are too many categories being presented at one time. Each slice becomes so small that the visualization loses its effectiveness.
- Highlighting category dominance – When there is a single category or two that make up the greatest part of a whole a pie chart may be appropriate to convey this information.
As you can see, pie charts are not inherently bad but get most of their bad reputation from inappropriate use. pie charts remain a powerful visualization tool with high visual impact. They’re great for conveying information quickly and efficiently, especially if your dashboard has limited space.
Now let’s look at how to set them up in Tableau.
Understanding the sections of the Tableau Interface
When creating visuals in Tableau there are two primary sections. The far-left panel that lists all of the columns, fields and measures and the Marks section that is on the panel to the right of it. When creating visuals, you drag and drop fields and measures onto the different configuration options available in the marks section.
For example, to show Total Sales as a label for each section of a pie chart, drag and drop Total Sales onto the Text box inside of the Marks section.
Now, we’ll break it down into more detail. This next section assumes that you have already imported data into Tableau to work with.
Creating Pie Charts in Tableau
To create a pie chart in Tableau, first import a dataset and create a new worksheet. Change the Marks visual dropdown to Pie. Then drag and drop a numeric measure to the bottom of the marks section. Add additional visual effects by dragging and dropping a category onto the color mark, and numeric fields onto the label mark.
Tableau requires multiple steps to go from a blank canvas to a fully filled out pie chart with coloring, and section labels that you would traditionally think of when imagining a pie chart. We’ll break down each step into more detail.
Step 1.) Select the Pie Chart Visual
Click on the drop down menu in the Marks section that says “Automatic” by default, and select Pie. This dropdown lets you select which type of chart you want to create. In this case, Pie will let us create a pie chart.
Step 2.) Assign Values to the Pie Chart
After changing the Mark setting to Pie, it’s time to assign values. We’ll create an example pie chart based on Total Sales by Category. We do this by dragging and dropping field names into different parts of the Marks section.
As you drag and drop elements into the Marks section of Tableau, a visual will be generated in the canvas on the right of it. Visuals are created one at a time and are assigned to a larger dashboard or report at a later step.
Step 3.) Assign Colors to the Pie Chart
At this point, we have a circle. To split the circle into sections we can drag and drop a Category field onto the Color section of the Marks field.
When you drag and drop into the Marks section it will automatically assign colors based on the Category field.
Another method to adjust what the field does that’s been added to the Marks section is to click the icon to the left of it. You can toggle between assigning the field as a category labor, or category coloring etc. The icon is a quick way for you to identify what it does to the specific visual on the right.
Step 4.) Assign Data Labels to a Pie Chart
Fields can be added into the Marks section of Tableau multiple times and can be used for different purposes. In the example below we added the Category field a second time and changed the mark type from Color to Label. The Labels show up on the pie chart to the right.
Step 5.) Showing the Percentage of Total on a Pie Chart
To show a percentage of total on a pie chart, assign the label marks type to the field or measure that’s being displayed. Once it’s assigned to the marks section, you can click on it and use a Quick Table Calculation to display the Percent of Total.
In the example below, we added Total Sales for a second time into the Marks section and changed the mark type to Label. When we update the options to Quick Table Calculation our visual to the right displays the category name and the percentage of total that corresponds to a category
Step 6.) Adjusting Pie Chart Slice Sizing
You may have noticed in our example above that every colored section is the same size but makes up different percentages. That’s because we need to add our Total Sales amount one more time to the Marks section and assign it a Size Marks type.
After making the adjustment, we’ll see that our pie chart is now representative of the data in our data model. The pie chart shows category labels, is appropriately sized, and colored.
Adjusting Visual Size in Tableau
The default size of a visual in Tableau Desktop is fairly small. To make it larger to work on, move your mouse to the right or bottom edge of a visual. Your mouse will change from an standard pointer to a double sided arrow cursor. Left click and you can drag the size of the box containing a visual to scale it.
We recommend making this change early on in the process to an estimate of how much page space it’s likely to take up on your overall dashboard. It will make it easier to ensure that category labels fit as expected.
Now that the pie chart is established, we can add it to our dashboard.
Adding Visuals to Dashboards in Tableau
After creating a visual in Tableau, it can be assigned and organized with other visuals onto a dashboard. To do this, click on the dashboard tab which is notated by a square made up of 4 smaller squares at the bottom of Tableau Desktop,
The left side of the view displays the different sheets or visuals that have already been created. You can drag and drop each of the sheets from the left Dashboard Layout panel onto the canvas to the right. Tableau will automatically suggest layout sizes for each visual that adjust as you add more visuals onto the page.
From the same screen additional options can be set after a visual is added, by clicking on More Options, the triangle at the right side of the visual. From here, you can toggle the fit, which controls visual alignment, toggle the legend on and off etc.
The pie chart legend is treated as a semi-separate reporting element. You can move it to the side, top or bottom of the pie chart and control the formatting settings under More Options.
If you’re new to Tableau creating pie charts in Tableau can be a bit daunting, but the lessons learned while going through the process highlight many of the key features that you need to build out many other visuals. The pie chart itself is great at presenting clear, concise, and visually appealing data insights. Keep in mind best practices and try not to overwhelm your pie chart with too many categories to avoid report viewer confusion.