Saturday, December 23, 2023

Lesson 23 - Treemap in Power BI Desktop

A Treemap in Power BI is a visual used to display hierarchical data using nested rectangles. The size of each rectangle represents a numerical value, making it easier to compare the relative size and contribution of different categories.

Treemap's are useful for displaying large amounts of hierarchical data and understanding the proportions between different categories and the whole.


Power BI Infographic

🚀 Learn Power BI in 5 Minutes

Skip the long read.
See the key Power BI concepts in one easy-to-follow infographic.

View Infographic →
How to proceed?


Step 1 Import the Data

Launch Power BI Desktop, create a new report page, and import the required data.


Step 2 Add a Treemap

From the Visualizations pane, select the Treemap visual.


Step 3 Add Fields to the Treemap

Add the required fields to the appropriate field wells in the Build visual pane:

Category – Region
Details – Gender
Values – No of Participants

The Category field defines the main categories displayed in the Treemap.

In this example, Region is added to the Category field.

The Details field divides the main categories into smaller groups.

In this example, Gender is added to Details to show the gender distribution within each region.

The Values field determines the size of each rectangle based on the numerical value.

In this example, No of Participants determines the size of the rectangles.

The current Treemap visual exposes Category, Details, and Values for configuring the visual.

Step 4 Apply Filters

Filters allow you to focus on specific data displayed in the Treemap.

In this example, a Top N filter is applied to the Region field to display the top 10 regions based on the number of participants.

The By value field specifies the measure or numerical value used to rank the categories.

In this example, No of Participants is used as the By value field to identify the top 10 regions with the highest number of participants.

This Treemap helps compare the gender distribution across the top 10 regions.


Step 5 Customize the Treemap

You can customize the appearance of the Treemap using the Format visual pane. You can modify settings such as the title, legend, colors, data labels, category labels, background, and other visual properties.

Select the Treemap and use the available options in the Format visual pane to customize the visual.


Customize the Legend

The Legend helps identify the groups displayed in the Treemap.

You can customize the legend position, font, text size, and color using the available options in the Format visual pane.

Customize Colors

The Colors settings allow you to customize the colors used for the categories displayed in the Treemap.

Using different colors can help distinguish the categories or groups displayed in the visual.

Customize Data Labels

Data labels display the values associated with the rectangles in the Treemap.

You can customize the available label formatting options or turn off data labels when the visual contains many rectangles and becomes difficult to read.

Customize Category Labels

Category labels display the names of the categories or groups represented in the Treemap.

You can customize the available formatting settings to improve the readability of the category names.


Step 6 
Save the Visual

Finally, your Treemap is ready. Save the Power BI report to preserve the visual and its formatting.



When to use Treemap?


Treemaps are useful when you want to compare the relative size of different categories and understand how each category contributes to the whole.

They are especially useful when working with hierarchical data or when you need to display many categories in a limited report space.

Pros

  • Displays hierarchical data using nested rectangles.
  • Helps compare the relative size and contribution of categories.
  • Uses report space efficiently.
  • Can display many categories in a compact visual.
  • Supports interaction with other visuals in the report.

Cons

  • Small differences in rectangle sizes can be difficult to compare.
  • A large number of rectangles can make the visual difficult to read.
  • Labels may be difficult to display for very small rectangles.
  • Too many categories or colors can make the Treemap complex and difficult to interpret.

Conclusion


Treemaps provide a compact and effective way to display hierarchical data and compare the relative size of different categories. The size of each rectangle represents a value, while categories and details help organize the data into meaningful groups.

Treemaps are especially useful when displaying many categories in a limited space. Carefully selecting categories, colors, and labels helps create a clear and easy-to-understand visual.

Useful Information


Tags Power BI
Useful links How to Create Power BI Treemap - Power BI Docs
MS Learn Modules https://learn.microsoft.com/en-us/power-bi/visuals/power-bi-visualization-treemaps?tabs=powerbi-desktop

Test Your Knowledge

Quiz

No comments:

Post a Comment