How to Show Only Selected Values in Power Bi Pie Chart?

Do you want to learn to show only selected slices in the Power BI Pie chart?

In this Power BI tutorial, we will create a Power BI pie chart that displays only selected slices. Here, we will cover the examples below:

  • Show only selected slice labels in a pie chart based on Slicer In Power BI Desktop.
  • Filter Pie Chart based on Type from a table in Power BI Desktop.

Show only selected slice labels in a pie chart based on Slicer

Here, we will see how to show only selected slice labels in the Pie chart based on the slicer in the Power BI Desktop.

For example, I have the following sample table containing 3 columns: Category, Country, and Sales.

We will create a pie chart to display sales based on Category and then add a slicer that includes the Country column.

Pie Chart based on selected value in a Slicer

When a user selects a specific country from the slicer, the Power BI pie chart will filter the sales and categories displayed to show only those related to the selected country.

To do this, follow the below steps:

  • Open Power BI Desktop, then Load the data using the Get data option or create custom data using the Enter data option.
  • To show Sales based on Category in the Pie chart, from the visualization pane, select the Pie chart.
  • Then drag and drop the Sales and Category columns to the Values and Legend, respectively.
Power BI Pie Chart based on selected value in a Slicer
  • Similarly, we will create a Slicer, for this, from the visualization pane select the Slicer in Power BI Desktop.
  • Then drag and drop the Country column to the Field.
Show only selected slice labels in a pie chart based on Slicer
  • To display only the selected slice labels in a pie chart, select the country from the slicer. You will then observe that the pie chart reflects only the category and sales related to the chosen country.
Show only selected slice labels in a Power BI pie chart based on Slicer

This is how to show only selected slice labels in a Power BI pie chart based on Slicer.

See also  Power Automate Date Functions [10+ Examples]

How to filter a Power BI Pie chart by selection in a table

Here we will see how to filter a Pie chart by selection in a table in Power BI Desktop.

For example, we will use the below sample table, which contains 3 columns: Country, Sales, and Category.

Filter Pie Chart based on Type from table


Here, we will create two visuals: a table and a pie chart. The table visual will display sales and country, while the pie chart will display sales based on category.

When a user selects any country from the table, it will filter the Power BI pie chart to show only those categories related to the selected country. We will achieve this using a functionality called Edit Interactions.

The “Edit interactions” feature in Power BI allows users to control how visualizations interact with each other within a report page. This feature is particularly useful when you have multiple visualizations on a single page and you want to specify how one visualization should affect the others when users interact with it.

Let’s follow the below steps to filter a Power BI Pie chart by selection in a table.

  • Open Power BI Desktop and Load the data using the Get Data option.
  • To create a table visual, from the visualization pane select the Table.
  • Then, drag and drop the Country and Sales column in the Columns field.
Filter  Power BI Pie Chart based on Type from table
  • To create the Pie chart, from the visualization pane, select the Pie chart. Visual gets added to the Power BI Canvas.
  • Then drag and drop the Category and Sales to the Legend and Value, respectively, in Power BI.
power bi pie chart show only selected
  • Now, if we select the country, it will highlight the Sales by category based on that Country.
  • You can see it shows all the Categories in the Pie chart and highlights the slice based on the sales amount for each category.
Microsoft power bi pie chart show only selected
  • In the above case, it is just highlighting the pie chart visual based on the selection in the table. It is not filtering the pie chart visual.
  • To filter the visual, select the table.
  • Then click on the Format tab, and select the Edit interaction option.
Filter Power BI  Pie Chart based on Type from table
  • Now select the country from the table and then click on the Filter icon at the top of the Pie chart visual.
How to filter Power BI  Pie Chart based on Type from table

Now you can see the Pie chart gets filtered based on the Country from the Table.

How to filter a Pie chart by selection in table

This is how to filter a Pie chart by selection in table visual in Power BI Desktop.

See also  How to filter SharePoint choice field within Power Apps?

To access the two solutions, you can download the zip file. After downloading, extract the contents to obtain the .pbix file. Open the .pbix file, and you will be able to view the solutions.

Conclusion

In this Power BI tutorial, we saw how to create a Power BI pie chart that displays only selected slices.

  • Show only selected slice labels in a pie chart based on Slicer In Power BI Desktop.
  • Filter Pie Chart based on Type from a table in Power BI Desktop.

You may also like:

>