Saturday, December 23, 2023

Lesson 23 - Treemap in Power BI Desktop

Treemap is an interactive data visualization tool that allows you to represent hierarchical data in simple and organized way. It displays data using nested rectangles, where size and color of each rectangle helps you to understand the hierarchical relationship between them. Each rectangle's size corresponds to a specific attribute or value associated with a data point, and the nesting of rectangles visually represents the parent-child relationships within the data hierarchy.

How to proceed?

Step 1

Launch power BI desktop app and open the new report page and import the data required. 

Step 2

In “visualizations” pane click on “Treemap” which is highlighted in the given figure.

Step 3

Drag the data fields into “Field Section” that you want to analyze.  

Category- Defines the primary hierarchical or categorical structure of the data, and the treemap represents these categories as rectangles. "Category" field often acts as the parent field - Region.

Details- Specifies additional information related to the child elements or subcategories of the main "Category" field - Gender.

Values- Specifies the numerical data that determine the size of each rectangle within the treemap.

Step 4

Filters allows users to narrow down the displayed data on specific conditions.
Here, I used filters to examine gender differences among the top 10 regions with the highest number of participants.

The “By value” option enables you to filter data based on specific numeric values. This treemap highlighting the Top 10 countries with diverse gender representation. 

Step 5

Customizing the appearance

You can customize the appearance of the Treemap visual. Click anywhere on the visual and set the properties in the Format section.

Legend option enables you to customize the position, font style, and color scheme of the legend displayed within the treemap visual.

Colors allows you to modify the color of each category displayed in the treemap visual.

Data labels displays data value correspond to each category/subcategory and also it represents the size of each rectangle. They can be turned off when not needed for a cleaner visualization.

Category labels displays textual data, typically representing the names or labels of the data categories or groups.

Step 6

Save the visual.

Finally, your Treemap is ready. Click save button to save the visual.

When to use Treemap?

Treemap can be used in following scenarios.
  • When you want to compare the sizes of different data elements, Treemap is an excellent choice in showing relative proportions of the datapoints.
  • When your data has a hierarchical structure with clear parent-child relationship.


  • Treemaps are space-efficient since it can display large amount of data in a relatively small space.
  • Treemaps are suitable for portraying the distribution of sizes within a category.
  • Treemaps offer interactivity, allowing users to drill down into particular categories or data points for a closer look, enabling a deeper understanding and insights.


  • Tiny differences in data can be challenging to perceive in a Treemap since the size of the rectangles is a key factor in their visualization.
  • In dense Treemaps, labels or text linked to the rectangles might overlap, causing readability issues and making it harder to comprehend the data.
  • The effectiveness of a Treemap heavily relies on the use of color to highlight differences in data. When there are minimal distinct colors available for data visualization in a Treemap and a large amount of data to represent, it can lead to increased complexity and potential difficulties in interpretation.


Treemaps serve as a flexible and powerful method for displaying data with hierarchies and size-related aspects. When used appropriately, Treemaps can enhance your data analysis and storytelling capabilities, making complex information more accessible and engaging for your audience.

Tags Power BI
Useful links
MS Learn Modules

Test Your Knowledge


No comments:

Post a Comment