SSRS Tree Map

This SSRS article shows how to create a Tree Map, Show Data Labels, and format fonts and colors with an example. To demonstrate this Treemap 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 Tree Map example.


The Sql query that we used above SSRS example is:

SELECT Geo.[EnglishCountryRegionName] AS [Country]
      ,Geo.[StateProvinceName] AS [State]
	  ,SUM(Fact.OrderQuantity) AS Orders, 
       SUM(Fact.SalesAmount) AS Sales
FROM  DimCustomer AS Cust
INNER JOIN FactInternetSales AS Fact ON Cust.CustomerKey = Fact.CustomerKey
INNER JOIN [DimGeography] AS Geo ON Cust.GeographyKey = Geo.GeographyKey
GROUP BY Geo.[EnglishCountryRegionName],Geo.[StateProvinceName],Cust.Gender

Create the SSRS Tree Map Example

To add a Tree Map, 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.

Insert a New Chart

Select the Tree Map from the window and click OK to add to the report area.

Choose the SSRS Tree Map

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

Auto generated Graph with dummy data

Here, we added the Sales column to Values and the State column to Category Groups.

Add Columns to Values and Category Groups

Click the preview tab to see the Tree Map report. As you can see, it displays a group of rectangular boxes; each box belongs to a state, and its size depends on the sales value.

SSRS Tree Map Preview

By default, Show data Labels display the State Names, and to change them to sales values, right-click on the Tree Map and uncheck the Show Data Labels option once. If you do it twice, you lose the data labels entirely.

Show Data Labels as Numbers in SSRS Tree Map

Now, you can see the SSRS Tree Map with Sales values.


Let me add the States Column to the Series groups section to provide different colors for each state. Next, delete the legend because we don’t want to see all the state names.

Add Column to Series groups section

In the SSRS Tree Map report review, each state has a different color and sales values as data labels.

SSRS Tree Map with Colors

Suppose you change the Series Groups column from State to Gender. It divides the sales by Gender and displays the sales for both males and females.

Divide the TreeMap

Preview the report.

Report Preview

Let me add the State column and Gender to the Series groups to see the Colors.

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

Add Multiple Columns to Series Groups

Preview the SSRS Tree Map that represents sales by state, and each state is further divided by Gender.

SSRS Tree Map with Multiple Colors

Edit the tooltip to display more information. Here, we concat State and Sales values.

=Fields!State.Value &": " & Fields!Sales.Value
Add Expression to Tooltip

Check the tooltip when you preview the report.

SSRS Tree Map with Tooltip