What is Pie Chart in Power BI?
A Power BI Pie chart is a visual representation of data that displays proportions or percentages of different categories within a whole. It is particularly useful for illustrating the distribution of data across various types and comparing the relative sizes of those categories. Each category is represented as a slice of the pie, with the size of each slice corresponding to the proportion or percentage it represents.
Table of contents
- A Power BI Pie chart visualizes the distribution of data across different categories as proportional slices.
- To create a Pie chart, connect to your data source, select the appropriate fields, and choose the Pie chart visualization type.
- Customize the Pie chart’s appearance using formatting options such as data labels, colors, legend, title, exploding slices, and tooltips.
- Keep the number of categories manageable, sort them logically, and consider alternative visuals if the data complexity warrants it.
- Pie charts are best suited for illustrating proportions and trends rather than precise comparisons.
How to Create Pie Chart in Power BI?
To create a pie chart in Power BI, follow these steps:
Step 1: Open Power BI Desktop and connect to your data source.
Step 2: Navigate to the Visualization pane and choose the Pie chart visual.
It will create a blank Pie chart visual in the report canvas.
Step 3: Select the fields from the Fields pane, drag and drop them into Legend, Values, Details, and Tooltips section as appropriate.
The description of these sections is as follows:
- Legend – Refers to the categorical field to show color
- Values – Refers to the numerical amounts to plot.
- Details – This categorical field splits each slice.
- Tooltips – Add additional data fields that people can see in the tooltip when they hover over the part of this visualization.
It will create a Pie chart in the report canvas per the field mapping.
Step 4: Navigate to the Visual tab under the Format visual section Visualization pane to add formatting options on Legend, Slices, Data labels, and Rotations.
Expand the Detail labels to choose different data labels options such as Data Value, Percentage, or both to add labels on your Power BI Pie chart.
The Pie chart may not show all labels in some instances. It could be due to the limited space available in the report. You can fix the pie chart not showing all label issues by customizing the Detail labels option, such as Position and Label contents.
Step 5: Customize the appearance and formatting of the pie chart using the formatting options available in the Visualizations pane.
Step 6: Save and publish your Power BI report or dashboard.
The Power BI Pie chart show total values distributed across various categories or segments, with each slice representing a portion of the total. You can create groupings in the Pie chart and use them for reporting. To perform Pie chart group small values, you can create calculated measures or columns and then use them as a Legend in a Pie chart visual.
Formatting of Pie Chart
Power BI has various formatting options to customize the appearance of the Pie charts. Users can change colors, fonts, labels, and other visual elements to create Pie charts that meet their reporting requirements. Some common formatting options include:
Legend – The legend displays the categories represented in the Pie chart. You can customize its position, font, title, and other properties.
Slices – You can configure colors for each category displayed in a Pie chart.
Detail labels – You can choose to display or hide data labels that show the values or percentages for each slice.
Rotation – You can choose how much rotation you want to apply to a Pie chart.
Apart from the above, you can add a Title to the Pie chart, add effects to the visual, turn on visual headers, adjust size, position, and layouts, and customize the information displayed while hovering over the slices with the tooltip feature to the Power BI Pie chart visual.
Now we will go through the examples where we will create Pie charts in Power BI with Drill Down and Slicer functionalities.
In this example, we will create a Power BI Pie Chart with subcategories in Power BI Desktop using the Customer-Churn-Records data. To create the Pie Chart, follow these steps:
Step 1: Import the Customer-Churn-Records Dataset into Power BI using the data connection.
Step 2: Navigate to the Visualization pane and select the Pie chart visual.
It will create a blank Pie chart in the report canvas.
Step 3: Drag and drop the relevant fields from the Fields pane into Legend, Values, Details, and Tooltips section in the Visualization pane.
Here we have mapped the Balance (Credit Card Balance) to the Values section, whereas for Legend we have mapped both Card Type and Gender fields as category and subcategory, respectively.
It will create a hierarchical view within the Power BI Pie chart with subcategories in the report canvas.
Step 4: Navigate to the Visualization pane and add formatting options to make the Pie chart more visually appealing.
Here we have added shadow effects on the Pie chart available under the General tab in Format your visual section in the Visualization pane.
As you can see the Pie chart shows the percentage and absolute value of allocation of Credit card balances based on the Card type and Gender along with legends. You will also notice there are drill options such as Drill up, Drill down, Show next level, and Expand all one down level in the hierarchy icons are available.
Step 5: Hover the mouse over the Power BI Pie chart and select the Drill down icon (single down arrow).
Now click on the show next level icon (double down arrow).
You will see the Pie chart showing the distribution at the Gender level post drill down.
In this example, we will create a Power BI Pie chart using the Customer-Churn-Records data. To create the Power BI Pie Chart, follow the steps highlighted below:
Step 1: Import the Customer-Churn-Records data into Power BI using the data connection.
Step 2: Navigate to the Visualization pane, select the Pie chart visual and drag and drop the fields into Legend, Values, and Details section to create a Pie chart visual.
Here we have mapped Geography to Legend, Balances to Values, and Gender to Details section.
It will create a Power BI Pie chart in the report canvas.
Step 3: Navigate to the Visualization pane and add formatting options to the Pie chart.
Here we have added the All detail labels in Label contents. It will add all the details, such as category labels, values, and percentages of total values, to the Pie chart.
Also, we have formatted the background color, Title and added the summarize option on the Power BI Pie chart.
Now you can see the formatted Power BI Pie chart in the report canvas.
Step 4: Navigate to the Visualization pane and choose the Slicer visual. Drag and drop the field from the Fields pane to the Field section.
It will add a Slicer to the Pie chart report with all the values for the Card Type.
Step 5: Navigate to the Visualization pane and choose the formatting options for the Slicer. Here we have added the dropdown Style with the Select All option in the dropdown.
Important Things to Note
- Pie charts become less effective when there are too many categories, as the slices can become too small to interpret accurately.
- Arrange the categories in a logical order to make it easier for viewers to compare and understand the data.
- Depending on the nature of your data, other chart types like bar charts or stacked column charts may be more suitable for conveying information effectively.
- Pie charts are better suited for displaying proportions and general trends rather than precise measurements.
Frequently Asked Questions (FAQs)
To change the colors of a Power BI Pie chart, follows these steps:
• Navigate to the Visualization pane and select Pie chart visual in Power BI.
• Navigate to the Visual tab under Format your visual section in the Visualization pane.
• Expand the Slices section to view the Power BI assigned colors to each category in the Pie chart visual.
• To customize the colors, you can click on the color icon next to each category and select a new color from the color picker in the Colors pane.
• Alternatively, you can choose a pre-defined color theme or create a custom color theme for your pie chart by clicking on the “Color theme” dropdown and selecting the desired option.
There could be various reasons why a Pie chart in Power BI is not working as expected. Here are a few potential reasons and possible workarounds:
• Ensure that your data is correctly formatted, and the values are in the appropriate format for the pie chart. Verify that you have assigned the correct fields to the necessary sections of the chart, such as values, categories, and subcategories.
• Make sure you are aggregating your data correctly if you have multiple values or duplicates. For example, use appropriate measures or calculations in Power BI if you have numeric values that need to be summed or averaged.
• Check for any data inconsistencies or missing data points that might be causing issues with the chart. Clean up the data or handle missing values appropriately.
• Review the Visualization settings and properties of the Power BI Pie chart. Ensure that you have selected the appropriate visual type and assigned the correct fields. Check for any filters or slicers that might be affecting the data displayed in the chart.
Currently, Power BI does not natively support creating 3D pie charts. There are no available chart types to create a 3D Pie chart in Power BI Desktop. However, you can create a 3D effect or explore alternative visualizations using custom visuals available through the Power BI marketplace such as Advanced Pie and Donut – xViz or Drill Down Pie PRO by Zoomcharts or other external sources. These custom visuals may provide additional options for creating 3D visualizations, including pie charts.
To remove the percentage labels from a Power BI Pie chart, follow these steps:
• Select your Pie chart in the report canvas in Power BI Desktop.
• Navigate to the Visual tab under Format your visual section in the Visualization pane.
• Expand the Details labels section and choose non-percentage values (i.e., Category or Data value or Category, data value) from the Label contents dropdown.
• Alternatively, you can disable the Detail labels by toggling them off.
• This will remove any percentage labels from the Pie chart visual.
This has been a guide to Power BI Pie Chart. Here we learn how to create pie chart in power bi with examples. You can learn more from the following articles –