This SSRS article shows how to display the percentages in a pie chart using a simple expression with an example. To demonstrate this example, right-click on the Datasets folder to create a new DataSet. Writing the below code inside the SSMS shows the data set that we use for this example.
The Sql query that we used above SSRS example is:
SELECT Geo.EnglishCountryRegionName AS Country, SUM(Fact.SalesAmount) AS Sales FROM FactInternetSales AS Fact INNER JOIN DimCustomer ON DimCustomer.CustomerKey = Fact.CustomerKey JOIN DimGeography AS Geo ON DimCustomer.GeographyKey = Geo.GeographyKey GROUP BY Geo.EnglishCountryRegionName
Display Percentages in SSRS Pie Chart
To add a Pie Chart, right-click the report area, choose Insert, and then the chart option from the context menu. Otherwise, drag and drop the chart from the toolbox to the report area.
Select the Pie Chart from the window and click OK to add to the report area. Next, add the Sales field to Values and the Country field to the Category Groups section. Next, select the Country under the Category Groups section to open its properties. Then, either remember the default name or change it to a more meaningful one.
Right-click on the Pie chart and select the Show Data Labels option to see the values.
Right-click on the Data labels and choose the Series label properties option. Within the general tab, click the ƒx button to write an expression to Display Percentages in the SSRS Pie Chart.
The below expression divided the Country category group by the complete dataset to get the Percentage.
=Sum(Fields!Sales.Value, "CountryGroup")/ Sum(Fields!Sales.Value, "CountryDSet")
Next, go to the Number tab and choose the Percentage option.
Let us see the report preview that displays Percentages.