SSRS Stacked Bar Graph

This SSRS article shows how to create a Stacked Bar Graph, Show data Labels, and format fonts and colors with an example. To demonstrate this example, right-click on the Datasets folder to create a new DataSet.

The below screenshot shows the data set that we use for this SSRS Stacked Bar Graph example.


The Sql query that we used above SSRS example is:

SELECT Terry.SalesTerritoryGroup AS Territory,
	SUM(Fact.SalesAmount) AS Sales,
	SUM(Fact.TotalProductCost) AS TotalCost
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 Bar Graph

To add a Stacked Bar Graph, right-click the report area, choose Insert, and then chart the option from the context menu. Otherwise, drag and drop the chart from the toolbox to the report area.

Insert a Chart

Select the Stacked Bar Graph from the window and click OK to add to the report area.

Choose the SSRS Stacked Bar Graph

Use the Plus button or drag the fields to the Values, Category Groups, and Series Groups sections.

Auto generated chart

Here, we added the Sales column to Values, the Color column to Category Groups, and Territory to the Series groups section.

Add Columns to Values, Category, and Series Groups

Next, use the toolbar or the properties window to format the X and Y-axis fonts and colors.

Format Axis Fonts

Right-click on the Stacked Bar Graph and select the Show Data Labels option to add labels.

Show Data Labels in SSRS Stacked Bar Graph

Right-click the Data Labels and select the Series Label Properties option to format Stacked Bars Numbers to show values in Thousands.

Format Data Labels Numbers

Preview the SSRS Stacked Bar Graph report.

Report Preview

Either change the palette property to change the colors or right-click the bars and choose the Series Properties option. 

Go to the Fill tab and use the expression by clicking the ƒx.

=iif(Fields!Territory.Value = "Europe", "DarkBlue",
	iif(Fields!Territory.Value = "North America","Green",
Expression to Change SSRS Stacked Bar Graph Colors

Preview the report.

SSRS Stacked Bar Graph Preview