Bewerken

Delen via


Display percentage values on a pie chart in a Report Builder paginated report

Applies to:  Microsoft Report Builder (SSRS)  Power BI Report Builder  Report Designer in SQL Server Data Tools

Report Builder lets you create pie charts and other visualizations to represent your data in a report. Within these charts, you can further customize how they look and behave to make them more useful for your report, including how percentages and legends display on your charts. By default the legend for pie charts shows categories. You might also want percentages in the legend or the pie slices themselves.

Screenshot of a pie chart that shows the legend of categories and percentages in the pie chart slices.

The Tutorial: Add a pie chart to your report (Report Builder) walks you through adding percentages to pie slices, if you'd like to practice with sample data.

Display percentage values as labels on a pie chart

  1. From the Insert on the Report Builder menu, select Chart and then either Chart Wizard... or Insert Chart. For more information, see Add a chart to a paginated report (Report Builder).

  2. On the Select Chart Type dialog box, select one of the pie chart options under Shape in the Column tab. Or select Pie in the Chart Wizard on the Choose a chart type page.

  3. On the Design surface, right-click on the pie chart and select Show Data Labels. The data labels appear within each slice on the pie chart.

  4. On the design surface, right-click on the labels and select Series Label Properties. The Series Label Properties dialog box appears.

  5. Enter #PERCENT for the Label data field.

  6. (Optional) To specify how many decimal places the label shows, enter #PERCENT{P*n*} where *n* is the number of decimal places to display. For example, to display no decimal places, enter #PERCENT{P0}.

  7. Select OK.

Display percentage values in the legend of a pie chart

  1. On the design surface, right-click on the pie chart and select Series Properties. The Series Properties dialog box displays.

  2. On the Legend tab, enter #PERCENT in the Custom legend text field.