While working as a business analyst in a retail company, I was analyzing which product sub-categories were contributing the most to our overall sales in all regions. For this, I had to visualize data that could show the size of sales across multiple categories and regions in a single view, without going through long tables.
In this tutorial, I will explain what a Tree Map is in Tableau and in which scenarios we can use a Tree Map to visualize our data in Tableau.
What is a Tree Map in Tableau?
In Tableau, Tree Map is used to display hierarchical data using nested boxes, where each box represents a category or sub-category. The size of each rectangle depends on a specific measure, such as sales, while the color can represent another measure, like profit. This allows us to understand the proportion of each part to the whole and identify the data patterns.
Create a Tree Map in Tableau
In the steps below, we will create a Tableau tree map to show the sales distribution of various product categories in all regions.
- To display the tree map boxes, add the Regions to the Color card. After this, add the Sales to the Size card.
This will add boxes with different colors. Here, each color block represents a region, and sales determine the size of the box.

- In the region blocks, we will display the distributed data of product sales. For this, add the Sales to the Label to show the sales figures.
After this, add the Category or the Sub-Category to the Color card to create nested distribution inside the region boxes.
This will display the sales of various product categories for each region. Here, the product sales will determine the size of the nested boxes.

Check out: Create a Bar Chart in Tableau
To edit the colors in the tree map, click on the dimension (Region) filters on the right side of the window and select Edit Colors.
Here, select the color palette that you want to assign to the tree map and click on the Assign button.

Now, the color from the selected pellet will reflect in the tree map.

This way, we can create a Tree map in Tableau by following the above steps.
Check out: Create a Scatterplot in Tableau
Create an Interactive Tree Map in Tableau
In Tableau, we can also create an interactive tree map. In this, the data will be displayed on the map when we check or uncheck the values. For example, if we have checked the category type Technology, then the map will only display technology data.
In this tree map, we will display the sales of the product divided by sub-category. For this, select the Sales and Sub-Category from the Data sidebar.
After this, go to the “Show Me” tab and select the Tree map.
Now, the tree map will be displayed with the data distributed by the product sub-category. Here, the size of the box corresponds to the sales of the specific sub-category.

Now we need to add the filter checkbox through which we display the data in the tree map. In this tree map, we will use the Category field. For this, click on the Category and select Show filter.

Now the category filter checkboxes will appear on the left side of the map. From here, we can check or uncheck the category values to display and remove data in the tree map.

For example, if we only check the value Technology, then the tree map will only display the sales of the sub-category that comes under the Technology category.
In the tree map, some of the box sizes may appear similar to others with less difference in the Sales values. For easy comparison, add the Sales to the Label to display sales for each sub-category.

Check out: Create Heat Map in Tableau
This way, we can create an interactive tree map in Tableau to display the data according to selected filter values.
I hope you have understood what a Tree map is in Tableau, and with the help of the examples above, we have learned how to create a tree map in Tableau. Then, we also created an interactive tree map to display data according to the selected filters.
You may like to read:
I am Bijay Kumar, the founder of SalesforceFAQs.com. Having over 10 years of experience working in salesforce technologies for clients across the world (Canada, Australia, United States, United Kingdom, New Zealand, etc.). I am a certified salesforce administrator and expert with experience in developing salesforce applications and projects. My goal is to make it easy for people to learn and use salesforce technologies by providing simple and easy-to-understand solutions. Check out the complete profile on About us.