Friday, December 22, 2023

Lesson 22 - Matrix Chart in Power BI Desktop

A Matrix visual in Power BI displays summarized data in rows and columns. Similar to a PivotTable in Excel, it helps organize and analyze data across multiple categories and dimensions.

Matrix visuals support hierarchical data, allowing users to expand, collapse, and drill down into different levels of detail. This makes it easier to compare values, analyze grouped data, and explore relationships within the dataset.


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 Matrix Visual

 From the Visualizations pane, select the Matrix visual.                                   

Step 3 Add Fields to the Matrix Visual


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

Rows – Region, Medal
Columns – Year
Values – Medal Count

Rows organize the data into categories and hierarchies. You can add multiple fields to the Rows field well to create different levels of detail.

In this example, Region and Medal are added to Rows. Medal categories such as Gold, Silver, and Bronze are displayed under each region.

Columns organize data horizontally across the Matrix visual.

In this example, Year is added to Columns to compare medal counts across different years.

Values display the summarized data at the intersection of rows and columns.

In this example, Medal Count is added to Values to display the number of medals for each region, medal category, and year.

Step 4 Apply Filters

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

In this example, a Top N filter is applied to the Region field to display the top 10 regions based on total medal count. This helps focus the analysis on regions with the highest medal totals.








The Year field is also filtered to display data between 2000 and 2016. This allows medal counts to be compared across regions for the selected period.














Step 5 Customize the Matrix Visual


You can customize the appearance and layout of the Matrix visual using the Format visual pane. Current matrix formatting includes layout and style presets, grid settings, values, column headers, row headers, subtotals, grand totals, specific columns, and cell elements.

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


Customize Row Headers

The Row headers settings allow you to customize the appearance and layout of the row categories.

You can modify available settings such as the font, text size, color, alignment, background, and hierarchy-related options.

For hierarchical data, the Matrix visual can display expand (+) and collapse (-) icons, allowing users to show or hide lower levels of detail.

Configure the Layout

The Matrix visual provides layout options for displaying row hierarchies. The available layout settings control how hierarchy levels are arranged and indented.

The Stepped layout displays hierarchy levels in a structured, indented format. You can enable or disable the stepped layout and adjust the available indentation settings.

Customize Subtotals

The Subtotals settings allow you to display or hide subtotal values in the Matrix visual.

You can configure row subtotals and column subtotals based on the reporting requirements.



Customize Grand Totals

The Grand total settings allow you to control and format the overall totals displayed for rows and columns.

You can customize the available formatting settings for row and column grand totals.

Customize Specific Columns

The Specific column settings allow you to customize an individual column without applying the same formatting to all columns in the Matrix visual.

This is useful when you want to apply different formatting to a particular value or column.






Use Cell Elements

The Cell elements settings allow you to apply conditional formatting to values displayed in the Matrix visual.

Depending on the field and configuration, you can use background colors, font colors, data bars, and icons to highlight important values. Conditional formatting applies to matrix values, totals, and subtotals rather than row or column headers.


In this example, different background colors are applied based on the medal count values. This helps identify higher and lower medal counts more easily.

Optional: Add Sparklines

You can also add sparklines to Table and Matrix visuals to display a small trend chart directly within a cell. Sparkline formatting includes line and marker settings in the Format pane.

I would add this as a short optional section because it is a useful current Matrix capability, but you do not need to change your Olympic example to demonstrate it.




Step 6 Save the Visual


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




When to use Matrix visual?


Use a Matrix visual when you need to compare summarized data across multiple categories or dimensions.

Matrix visuals are useful when you want to organize hierarchical data and allow users to expand, collapse, or drill down into different levels of detail. They are also useful for comparing values across rows and columns.

Pros
  • Supports hierarchical and multi-level data analysis.
  • Displays summarized values across rows and columns.
  • Supports expand, collapse, and drill-down capabilities.
  • Supports subtotals and grand totals.
  • Supports conditional formatting to highlight important values.
Cons
  • A large number of rows and columns can make the visual difficult to read.
  • Complex hierarchies can make the visual harder to navigate.
  • Large matrices may require scrolling and occupy significant report space.
  • Less visually engaging than graphical charts for identifying trends quickly.

Conclusion


Matrix visuals provide a structured way to analyze summarized data across multiple categories and dimensions. Their hierarchical structure, expand and collapse capabilities, subtotals, grand totals, and conditional formatting options make them useful for detailed data analysis.

However, a Matrix visual can become difficult to read when it contains too many rows, columns, or hierarchy levels. Carefully selecting fields and formatting options helps create a clear and effective visual.

Useful Information


Tags Power BI
Useful links How to Use Matrix in Power BI - Zebra BI
MS Learn Modules

Test Your Knowledge

Quiz

No comments:

Post a Comment