The Power BI treemap is used to display data in rectangular boxes. You can define the rectangle box using any Dimension column and its size by Measure value.
Treemaps in Power BI are very useful for displaying the largest data in a small region. For this demo of Creating a Treemap in Power BI, we will use the SQL data source that we created in our previous article.
See the article Connect Power BI to SQL Server to understand the Power BI data source.
How to create a Power BI treemap
To create a Power BI treemap, first drag and drop the Sales Amount section of the fields onto the canvas. Automatically create a column chart.
By clicking on the treemap below the Display section automatically converts column chart to treemap
Next, let me add the English product name from DimProduct Table to the Group section. Divide the rectangular boxes according to the amount of sales for each product.
Create a Power BI 2 treemap approach
By clicking on the treemap present in the Display section, creates a treemap with dummy data.
To add data to Power BI TreeMap, we have to add the required fields:
- Group: Specify the column that divides the rectangular boxes.
- Values: Any numerical value, such as sales amount, total sales, customer count, etc.
Let me drag and drop the Field Sales section to the Values field.
Then add the department name from the DimEmployee table to the group section. You can do this by dragging the Department Name to the Group section, or check the Department Name column
Now you can see the Treemap of the sales amount divided by the name of the employee department. Hover over any box to display the department name and sales amount tooltip
Let me apply a quick format to the Power BI tree map
NOTE: I suggest you refer to the Format TreeMap article to understand the steps required to format Power BI TreeMap box colors, title font, title alignment, data labels, and colors.