This SSRS article shows how to create a Stacked Column Chart, Show data Labels, and format fonts and colors with an example. To demonstrate this Stacked Column Chart 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 Stacked Column Chart example.
- Shared Data Source.
- Embedded Data Source.
- Embedded DataSet.
- Column Chart
- 100% Stacked Column Chart
- 3D Clustered Column Chart
The Sql query that we used in this SSRS example is:
SELECT Terry.SalesTerritoryGroup AS TerGroup, Prod.Color,
SUM(Fact.SalesAmount) AS Sales FROM DimProduct AS Prod
INNER JOIN FactInternetSales AS Fact ON Prod.ProductKey = Fact.ProductKey
INNER JOIN DimSalesTerritory AS Terry ON Terry.[SalesTerritoryKey] = Fact.[SalesTerritoryKey]
GROUP BY Terry.SalesTerritoryGroup, Prod.Color
SSRS Stacked Column Chart
To add a Stacked Column 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 Stacked Column Chart from the window and click OK to add to the report area.
Use the Plus button or drag the fields to the Values, Category Groups, and Series Groups (optional) sections. Here, we added the Sales column to Values, the Color column to Category Groups, and TerritoryGroup to the Series Groups section.
Preview the SSRS Stacked Column Chart Report.
Right-click on the Stacked Column Chart and select the Show Data Labels option to add labels.
Right-click the Data Labels and select the Series Label Properties option. It helps to format Stacked Column Numbers to show values in Thousands with a currency symbol.
Next, right-click on the legend and choose Legend properties to format the style, change position, etc.
Use the toolbar or the properties window to format the Stacked Column Chart font, the X-axis and Y-axis color, data labels, and legend. Next, right-click the bars and choose the Series Properties option to format the borders, font, background color, etc.
Preview the Stacked Column Chart report with custom colors, borders, and formatted legend.