How to Create a Tree Map in Tableau
A tree map is one of the most effective ways to visualize hierarchical data, showing you how a whole is divided into its parts. Instead of staring at a sprawling spreadsheet, you get an instant visual overview of your biggest contributors. This guide will walk you through exactly how to create a detailed and insightful tree map in Tableau, step by step.
What is a Tree Map and When Should You Use One?
Think of a tree map as a more sophisticated pie chart. It uses nested rectangles to represent different categories and their share of a whole. The size of each rectangle is proportional to a specific measure (like sales volume), while the color can represent a second measure (like profit margin) or a dimension (like product category).
This structure makes them perfect for answering questions like:
- What are our top-selling product categories and sub-categories?
- Which marketing channels are driving the most traffic, and which campaigns within those channels are the most successful?
- How are our sales distributed across different regions and states?
Essentially, whenever you have data that can be broken down into parent-child relationships (e.g., Region > State > City, or Ad Platform > Campaign > Ad Group), a tree map is a fantastic choice.
The Key Components of a Tree Map
To build a tree map, you need two main ingredients from your data:
- Dimensions: These are your categorical, hierarchical fields. In our examples,
Region,State, andCityare dimensions. You'll need at least one, but they are most powerful when you use two or more to create the nested structure. - Measures: These are your numerical, quantitative fields that you can count or calculate. You need one measure for size (e.g.,
Sales) and can use a second for color (e.g.,Profit).
For example, if you created a tree map of product sales, the larger rectangles would instantly show you your cash cows, while the color could immediately tell you which of those are most profitable.
How to Make a Tree Map in Tableau: A Step-by-Step Guide
We’ll use the Sample - Superstore dataset that comes pre-loaded with every version of Tableau, so you can easily follow along. Our goal is to create a tree map that shows sales performance broken down by product category and sub-category.
Step 1: Connect to Your Data Source
First, open Tableau and connect to your data. On the start page, under "Saved Data Sources," click on Sample - Superstore. This will load the dataset and take you to a new worksheet.
You’ll see your dimensions (like Category, Region, Ship Mode) listed in the top section of the Data pane on the left, and your measures (like Discount, Profit, Sales) listed below them.
Step 2: Start Building the View
Let's begin by adding your primary measure, which will define the size of the rectangles.
- Find the Sales measure in the Data pane.
- Drag Sales onto the Size box on the Marks card.
Next, let's create the hierarchical structure with our dimensions.
- Find the Category dimension.
- Drag Category onto the Text box (or Label box) on the Marks card.
At this point, you might not see a tree map yet. That's fine! The final step is to officially select the chart type.
In the top-right corner of the workspace, you’ll see the "Show Me" panel. Click on it, and you'll see a gallery of chart types. The options that are available for the data you've selected will be highlighted. Select the Treemaps option (it looks like a set of nested boxes).
Instantly, your view will transform into a basic tree map. You'll see three large rectangles representing your main product categories: Furniture, Office Supplies, and Technology. Their size is proportional to their total sales.
Step 3: Add a Second Level to the Hierarchy
A single-level tree map is good, but the real power comes from drilling down into the hierarchy. Let’s add the Sub-Category to see which products are the biggest sellers within each main category.
- Find the Sub-Category dimension in the Data pane.
- Drag Sub-Category and drop it also on the Text box on the Marks card.
Tableau automatically nests the sub-categories inside their parent categories. Now, the Technology box is broken down into smaller rectangles for Phones, Accessories, Machines, and Copiers. You can immediately see that Phones and Chairs are the largest sub-categories by sales.
You have successfully built a tree map! The remaining steps focus on enhancing it with more information to make it more useful for analysis.
Step 4: Use Color to Add Another Layer of Insight
Right now, our tree map only tells us about sales volume. But are the highest-selling products also the most profitable? Let's use color to find out.
- Find the Profit measure in the Data pane.
- Drag Profit and drop it onto the Color box on the Marks card.
Tableau will apply a default color gradient. Typically, this is a blue or green sequential gradient where darker shades represent higher profit. Notice anything interesting? The Tables sub-category is quite large, indicating high sales, but its color is a lighter shade, pointing to lower profitability compared to others.
To make profitability even clearer - especially for identifying losses - we can change the color palette.
- Click the Color box on the Marks card, then select "Edit Colors..."
- From the "Palette" dropdown, choose a diverging palette, like Red-Green Diverging. This is perfect for showing positive and negative values.
- Click "Apply" and "OK."
Now, your tree map vividly highlights a problem area. The Tables rectangle is now bright red, showing that this high-volume product is actually losing money. This is an insight that was completely hidden in the raw data.
Step 5: Refine Labels and Tooltips
The final step is to clean up the labels and add more context for your audience. Right now, our labels show the Category and Sub-Category. Let’s add the actual sales figures to the view.
- Drag the Sales measure onto the Label box on the Marks card.
- You can also drag Profit onto the Label box to show it next to sales.
The chart might look a little cluttered, especially in the smaller rectangles. You can click on the Label box to format the presentation of the text, change the font size, or adjust the alignment.
Tooltips are another powerful way to provide detail without cluttering the visualization. A tooltip is the box that appears when you hover over a rectangle. You can customize what information it shows.
- Click on the Tooltip box on the Marks card.
- This opens an editor where you can add text, rearrange fields, and even do calculations. For example, you could add the Quantity sold or the Profit Ratio to provide more context on hover.
Tips for Building Effective Tree Maps
Creating the chart is just the beginning. Follow these best practices to ensure your tree map is easy to interpret and delivers clear insights.
- Don't Overcrowd it: Tree maps become less effective when you have hundreds of tiny rectangles. If your lowest-level dimension is too granular (e.g., individual product SKU), consider grouping smaller categories into an "Other" segment or using a filter to narrow the focus.
- Use Color Intentionally: Use color to highlight performance. A diverging palette (like red-to-green) is excellent for measures that have a clear mid-point like Profit. A sequential palette (light-to-dark) works well for measures like
SalesorQuantity. - Keep it Rectangular: While Tableau has lots of chart options, the rectangular shape of a tree map is better for comparing size than the shapes in a packed bubble chart. Our eyes are better at judging the area of rectangles than circles.
- Add Interactivity: Combine your tree map with other charts in a dashboard. You could have a bar chart of regional sales, and when a user clicks a region, the tree map updates to show the product mix for just that region.
Final Thoughts
Tree maps in Tableau give you a powerful way to visualize hierarchical data, turning complex relationships into a simple, digestible graphic. By encoding size and color with key business metrics, you can quickly spot top performers, identify hidden problems, and understand the composition of your business at a glance.
While tools like Tableau are incredibly powerful, there can still be a steep learning curve to get started, and building reports can often be a manual, time-consuming process. We built Graphed because we believe getting insights from your data shouldn't be that complicated. Instead of navigating menus and dragging fields, you can connect your marketing and sales data sources and simply ask questions in plain English, and Graphed builds instant, real-time dashboards for you.
Related Articles
How to Connect Facebook to Google Data Studio: The Complete Guide for 2026
Connecting Facebook Ads to Google Data Studio (now called Looker Studio) has become essential for digital marketers who want to create comprehensive, visually appealing reports that go beyond the basic analytics provided by Facebook's native Ads Manager. If you're struggling with fragmented reporting across multiple platforms or spending too much time manually exporting data, this guide will show you exactly how to streamline your Facebook advertising analytics.
Appsflyer vs Mixpanel: Complete 2026 Comparison Guide
The difference between AppsFlyer and Mixpanel isn't just about features—it's about understanding two fundamentally different approaches to data that can make or break your growth strategy. One tracks how users find you, the other reveals what they do once they arrive. Most companies need insights from both worlds, but knowing where to start can save you months of implementation headaches and thousands in wasted budget.
DashThis vs AgencyAnalytics: The Ultimate Comparison Guide for Marketing Agencies
When it comes to choosing the right marketing reporting platform, agencies often find themselves torn between two industry leaders: DashThis and AgencyAnalytics. Both platforms promise to streamline reporting, save time, and impress clients with stunning visualizations. But which one truly delivers on these promises?