A few days ago, I was assigned a task to create a Report in Power BI based on the ‘Product Order Data’, which analyzes the sales profit by Product, category, and subcategory at different hierarchical levels.
For this, I used a ‘Treemap’ visual in a Power BI report that represents the hierarchical data in a set of nested rectangles.

In this Power BI tutorial, I will explain the Tree Map in Power BI. Also, I will cover the points mentioned below:
- Create a TreeMap on a Power BI Report
- Displaying Multiple Values in Power BI Treemap
- Show the Top 10 Elements in Treemap Power BI
- Power BI Treemap Set Drill Down & Drill Up Feature
- Show Value as Percentage on Power BI Treemap
- Sort Elements Order in Power BI Treemap
Tree Map in Power BI
A Tree Map visualization in Power BI displays the hierarchical data in the form of nested rectangles. Each rectangle displays the category or a subcategory in the Tree map.
Check out the points below about the Tree Map visual:
- Each hierarchy level is represented by a single, colored rectangle called a “Branch node”.
- Inside the branch node, it has smaller rectangles called “Leaf nodes”.
- The larger and darker shaded rectangles (Nodes) indicate higher values.
The rectangles are arranged in such a manner, i.e, the larger branch node at the top left and the smallest branch at the bottom. The arrangement of leaf nodes also follows the same pattern.
Power BI uses the measure value to determine the rectangle size for a branch node and leaf nodes.
You can have a look at the image below, which shows the tree map visual in Power BI:

From the image displayed above, the rectangles represent:
- Blue, Yellow, and Pink Rectangle – Branch nodes with Product Categories like Office supplies, Technology, and Furniture.
- Small rectangles inside each branch are leaf nodes, which show the product subcategory inside each category.
When to use Tree Map in Power BI?
Below, I will display the scenarios where the tree maps can be used.
- To display the large amounts of hierarchical data on a Power BI report.
- When a bar chart cannot handle a large number of values.
- To represent the attributes using color coding and size.
Create a Tree Map Visualization In Power BI
Here, I will show you how to add a Tree Map visual in Power BI.
I have a Product Order Data in an Excel file with the following columns, as shown in the screenshot below.

I want to create a tree map on the Power BI report that shows Category, Subcategory, and Profit.
- Open your Power BI Desktop, connect the data source using the ‘Get data’ option from the ribbon.
- Under the visualization pane, select the ‘Treemap’. Then, an empty treempa will be created that does not have any fields.

- Now, drag and drop the values from the Data pane to the fields pane.
- Category – Drag and drop ‘Category’
- Details – Add ‘Sub Category’
- Values – Choose to add ‘Profit’

In the screenshot below, you can see the Power BI treemap visual.

Display Multiple Values in Power BI Treemap
Here, I will show you how to display multiple values on a tree map visual in Power BI.
The image below shows the Tree map with the values of Category, Subcategory, and Profit of a product.

I want to display or add multiple values [Product, Quantity, and Sales] on the data point tab in the tree map.
You can do this by adding values in the Tooltips option. Check out the quick steps below:
- Under the Visualizations pane, select Build visual section.
- In the tooltip field, drag and drop the values from the data pane into this [Product, Quantity, and Sales].

- Now, when you hover over the treemap, it will display multiple values as datalabels. Refer to the image below:

Show Top 10 Values in Power BI Treemap
Let me show you how to display the top ’10’ values on the Power BI Tree map.
Consider a scenario where you want to show the top 10 selling products with the sales amount.
Below are the steps to follow:
- In Power BI Desktop, select the tree map from the visualization pane.
- On the ‘Category’ field, drag and drop the ‘Products’ from the data pane.
- Similarly, in the value field, drag and drop the ‘Sales‘ from the field pane.

- Now, go to the Filters pane, expand the ‘Product Name’ field, and select the Filter Type as ‘Top N’.
- Under Show items, select 10.
- Next, drag and drop the field you want to filter by; in my case, it’s sales. Click on Apply filter.

After that, you can see the applied changes in the Power BI Tree map, which shows the top 10 selling products.

Set Up Drill Down and Drill Up in Power BI Treemap Visualization
Let me show you how to drill down and drill up through the hierarchy levels in the Treemap visualization of Power BI.
Here is the image of the Treemap that has hierarchy levels of [Category, Sub-category, and Product Name].

To drill down all the levels of the category in the Power BI Tree map, see the steps mentioned:
- In Power BI Desktop, select the treemap from the visualization.
- In the Category field, drag and drop multiple values from the data pane. Here, I have added [Category, Sub-category, and Product Name].
- In the Value field, drag and drop the Sales from the Data pane.

- Click on the drill-down icon, present at the top of the treemap visualization, to expand all levels down in the hierarchy.

You can see the treemap drill-down in the Power BI Desktop in the screenshot below.

- Similarly, to drill up to the first hierarchy level, click on the ‘Drill up’ icon for each level.

By doing this, you can return to the first hierarchy level, as shown in the image below.

Display Value as Percentage on Power BI Treemap
In this section, I will explain how to show the value and percentage on the tree map visual in Power BI.
The image represented below shows the Power BI Tree map, with the values like [Product, Category, and Sub category].

I wanted to display the Profit value as a percentage on the tree map for all the products.
Follow the steps here to display the value as a percentage:
- On the Power BI report, select the tree map.
- Go to the Formatting section under visualization, turn on the Data label.

- Next, click on the Build visual under the visualizations pane, click the drop-down menu in the value field, and select “Show value as”> select “Percent of grand total“.

From the screenshot below, you can see that Power BI Treemap is displaying the profit value as a percentage.

Sort Elements Order in Power BI Treemap
In Power BI, a tree map visual will sort the values by default. The rectangles will be arranged in size from left [largest] to the bottom right[smallest].
From the Screenshot below, you can see that the higher values are arranged from left to right.
- Paper – 67.59k
- Binders – 40.76k
- Copiers – 25.00k
- Labels – 24.14k
- Accessories – 22.00k
- Tables – 21.67k etc.

- In a Power BI treemap, the top left element will be the highest value.
- In the treemap, all the other elements are arranged by value, flowing down from the top.
Note:
You can not arrange or sort the rectangular tiles in alphabetical order, because it will be arranged based on the value of category.
When working with the tree map visual in Power BI, keep in mind this limitation: you can either use the ‘Details’ option to specify the rectangle’s colors or use ‘Data colors’ to color the rectangles, but not both options at the same time.
You may also Learn Other Power BI Tutorials:
- Power BI Q&A Visualization
- Power BI Donut Chart
- Create Ribbon Chart in Power BI
- Power BI Slicer Dropdown

After working for more than 18 years in Microsoft technologies like SharePoint, Microsoft 365, and Power Platform (Power Apps, Power Automate, and Power BI), I thought will share my SharePoint expertise knowledge with the world. Our audiences are from the United States, Canada, the United Kingdom, Australia, New Zealand, etc. For my expertise knowledge and SharePoint tutorials, Microsoft has been awarded a Microsoft SharePoint MVP (12 times). I have also worked in companies like HP, TCS, KPIT, etc.