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.
How Artificial Intelligence and Data Add Value to Businesses
Knowledge is power. And the data that you collect in the course of your business
May
Databricks Vs Synapse Spark Pools – What, When and Where?
Databricks or Synapse seems to be the question on everyone’s lips, whether its people asking
1 Comment
May
Power BI to Power AI – Part 2
This post is the second part of a blog series on the AI features of
Apr
Geospatial Sample architecture overview
The first blog ‘Part 1 – Introduction to Geospatial data’ gave an overview into geospatial
Apr
Data Lakehouses for Dummies
When we are thinking about data platforms, there are many different services and architectures that
Apr
Enable Smart Facility Management with Azure Digital Twins
Before I started writing this blog, I went to Google and searched for the keywords
Apr
Migrating On-Prem SSIS workload to Azure
Goal of this blog There can be scenario where organization wants to migrate there existing
Mar
Send B2B data with Azure Logic Apps and Enterprise Integration Pack
After creating an integration account that has partners and agreements, we are ready to create
Mar