Power BI Treemap is used to display the data in Rectangle Boxes. You can define the rectangle box using any Dimension column, and its size by Measure value.
The Tree maps in Power BI are very useful to display the largest data in a small region. For this Create a Treemap in Power BI demonstration, we are going to use the SQL Data Source that we created in our previous article.
How to Create a Power BI Treemap
To create a Power BI tree map, first, Drag and Drop the Sales Amount from Fields section to Canvas. It automatically creates a Column Chart. Please refer to Connect Power BI to SQL Server article to understand the Power BI Data Source.
By clicking the Treemap under the Visualization section automatically convert the Column Chart into Treemap
Next, let me add the English Product Name from DimProduct Table to the Group section. It divides the rectangle boxes based on the Sales amount by each product.
Create a Power BI Treemap Approach 2
When you click on the Treemap present in the Visualization section, it creates a Treemap with dummy data.
To add data to Power BI TreeMap, we have to add the required fields:
- Group: Please specify the Column that divides the Rectangle Boxes.
- Values: Any Numeric value, such as sales amount, Total Sales, Customer count, etc.
Let me drag and drop the Sales from Fields section to Values field.
Next, add Department Name from the DimEmployee table to the group section. You can do this by dragging Department Name to Group section, or checkmark the Department Name column
Now you can see the TreeMap of Sales Amount that is divided by Employees Department Name. Hover over any box shows the Tool-tip of Department Name and its Sales Amount
Let me do some quick formatting to the Power BI Tree map
NOTE: I suggest you to refer Format TreeMap article to understand the steps involved in formatting the Power BI TreeMap Box Colors, Title font, Title alignment, Data labels, and colors.