The current instalment in my SSRS 2016 blog series focuses on one of the two new chart types – Tree Maps. They were made available to Reporting Services 2016 CTP 2.3.
What are Tree Maps?
Tree Maps are designed to analyse quantitative measures that fit into a hierarchy. To put it simply, this enables a user to visualise how an attribute is performing against its parent category and in turn, how this category performs against other categories. The size of rectangle (in the example below) is proportionate to the numeric quantity.
Source: MSDN (Microsoft)
Creating a Tree Map
I will now show you how to create a simple Tree Map chart in SSRS 2016. The functionality is available through both Report Builder and Visual Studio. For this demo, I will use Report Builder.
1. Navigate to Report Builder through your configured SSRS web service and choose Blank Report.
2. Set up your own relevant Data Source, dimension Datasets and report Parameters. I suggest using a simple fact table and dimension from AdventureWorksDW2016. A copy of this database can be found here.
3. Select Insert > Chart > Insert Chart from the Menu Pane.
4. Create the Tree Map Dataset, which is derived from the fact table. The SQL for my chart is as follows:
SELECT DT.Country,
DL.LeagueName,
DT.TeamName,
SUM(LT.TotalPoints) AS Points
FROM [Warehouse].[VwFactLeagueTable] AS LT
INNER JOIN
[Warehouse].[DimTeam] AS DT
ON DT.TeamKey = LT.TeamKey
INNER JOIN
[Warehouse].[DimLeague] AS DL
ON DL.LeagueKey = LT.LeagueKey
GROUP BY
DT.Country,
DL.LeagueName,
DT.TeamName
The query is bringing back the total number of points each English football team has accumulated since the 2010/11 season.
5. Create Values, Category Groups and Series Groups (as shown below). These work in exactly the same way as other versions of SSRS.
6. Right Click on ‘Sum(Points)’ and select Series Properties.
7. In the Series Data tab, select the Tooltip Expression.
8. In the screenshot below, I have concatenated the team name field and the value together, as the Tree Map will truncate descriptions that do not fit in a section. The logic could be different for your own Tree Map. Click OK to confirm changes.
9. Add any additional chart headers, logos, etc to your report and Save the report. Click Run to view it.
10. That is it – the report is now ready. As you can see, ‘Man United’ are not visible until you hover over the applicable section.
Conclusion
Designing and implementing a Tree Map is very easy in SSRS 2016. Although this is a new chart type, you can set up a simple example in minutes. A BI analyst, report user or a company CEO can use Tree Maps to quickly spot well or badly performing products/features/departments. As this chart is hierarchical, you are able to analyse different levels of data in one visualisation.
Once we have grasped the concept, we can begin to create far more sophisticated Tree Maps. Although I will not be touching on them in this blog, there is plenty of material out there already that goes into greater detail.
References/Future Reading
For more information on Tree Maps, I recommend the below resources/blogs:
· Adventure Works DW 2016 CTP 3.0 database download – https://www.microsoft.com/en-us/download/details.aspx?id=49502
· MDSN Blog – https://msdn.microsoft.com/en-us/library/mt416753.aspx
· Sorna Kumars Muthuraj (MVP) Web Blog – https://www.youtube.com/watch?v=mj2eqelJt7E
· Using Tree Maps in Excel (Microsoft) – https://blogs.office.com/2015/08/11/breaking-down-hierarchical-data-with-treemap-and-sunburst-charts/
My next blog will focus on another new chart type – Sunbursts.
Pareto Charts in Power BI and the DAX behind them
The Pareto principle, commonly referred to as the 80/20 rule, is a concept of prioritisation.
Apr
Databricks: Cluster Configuration
Databricks, a cloud-based platform for data engineering, offers several tools that can be used to
Apr
AI Assistance in Microsoft Fabric
The exponential growth of Large Language Models (LLMs) couples with Microsoft’s close partnership with OpenAI
Apr
10 reasons why it’s worth the effort to understand the value of your data
“If leaders really want to create a data driven culture, the journey starts with them!
Apr
Content Safety in Azure AI Studio
Azure AI Content Safety is a solution designed to identify harmful content, whether generated by
Apr
Model Benchmarks in Azure AI Studio
In the constantly changing field of artificial intelligence (AI) and machine learning (ML), choosing the
Apr
Celebrating International Women’s Day: from Classroom to Code
As we celebrate International Women’s Day, I want to share my journey of breaking stereotypes
Mar
Pretty Power BI – Adding Pagination to Bar Charts
Good User Experience (UX) design is crucial in enabling stakeholders to maximise the insights that
Feb