Heatmap Table in Excel, Google Sheet, Power BI, Tableau and Google Data Studio

Bài viết này mình hướng dẫn các bạn cách tạo bảng số liệu phân bổ theo nhiệt độ màu trong một số công cụ tạo visuals như Excel, Power BI và Tableau.
This post is to introduce you how to create a heatmap table in some visualization tools like Excel, Power BI and Tableau.

Biểu đồ heat map là một loại biểu đồ sử dụng màu sắc để biểu diễn dữ liệu trong bảng.
A heat map chart is a specialized chart that uses colors to represent data values in a table.

Sử dụng dữ liệu bên dưới để tạo bảng số liệu heatmap.
Please use the below data table to create a heatmap table.

#1: Excel Heatmap Table

Trong Excel, tính năng Conditional Formatting (định dạng theo điều kiện) giúp người dùng minh họa dữ liệu bằng việc sử dụng Color-Scale.
In Excel, Conditional Formatting function helps users to illustrate the data by using Color-Scale.


#3: Google Sheet Heatmap Table

Google Sheet aslo provide as the same function as Excel called Conditional Formatting:

Thay đổi thang màu nếu cần thiết:
Change the color scale if needed:


#3: Power BI Heatmap Table

Dữ liệu mình đề cập ở trên không chính xác khi sử dụng tính năng định dạng có điều kiện cho ma trận trong Power BI. Nên chúng ta cần unpivot dữ liệu trong Power Query Editor theo các bước như sau:
Data Table I mentioned above is not proper to use conditional formating in the matrix of Power BI. So that, we have to unpivot them in Power Query Editor as the following steps:

Step 1: Convert data range to a table
Chọn tất cả dữ liệu bằng Ctrl+A và chuyển sang dạng bảng bằng Ctrl+T
Select all cells in that range by pressing Ctrl+A, then Ctrl+T (or Tab Insert -> Table) to convert them to a table.

Step 2: Import the table to Power Query Editor
Tab Data -> Group Get & Transform Data -> From Table/Range


Step 3: Unpivot Columns
Chọn cột Store hoặc các cột còn lại, tại Tab Transform, chọn Unpivot Other Columns:
Select column Store or others column -> Tab Transform -> Unpivot Columns -> Unpivot Others Column (in this case, I selected Store Column):

Bảng sẽ được chuyển đổi như hình bên dưới:
The table will be transformed as the following picture:

Thay đổi tên cột Attribute thành Quarter nếu cần thiết:
Rename Attribute column as Quarter if needed:

Step 4: Close Power Query Editor window and apply to a new sheet in Excel

Step 5: Import the new table to Power BI

Step 6: Create a matrix visual like the below table (hide Column and Row Total)

Step 7: Apply Conditional Formatting (Background Color) to Value

Áp dụng hệ màu Gradient như hình bên dưới:
Apply the Gradient as the following picture:

Cuối cùng, chúng ta đã có được bảng dữ liệu heatmap trong Power BI:
Finally, we got a heatmap table on Power BI:

#4: Tableau Heatmap Table

Step 1: Import Data Table in Excel file to Tableau

Kéo Quarter vào Columns, Store vào Rows Value vào Text Marks để tạo bảng dữ liệu thô:
Drag Quarter dimension to Columns, Store dimension to Rows and Value Measure to Text Marks to create a raw data table:

Step 2: Add Color to the Table

Tiếp tục kéo trường Value vào Color Marks:
Drag again Value Measure to Color Marks:

Sau đó thay đổi từ Automatic sang Square tại hộp Marks:
Then change Automatic to Square on the Marks Pane:

Thay đổi sang hệ màu đỏ nếu cần thiết:
Change the color set to Red pallete if needed:

Chúng ta cũng đã tạo được bảng dữ liệu heatmap trên Tableau.
Finally, we also got the heatmap table on Tableau.

#5: Google Data Studio Heatmap Table

Sử dụng Pivot Table with Heatmap để tạo bảng dữ liệu heatmap:
Using Pivot Table with Heatmap visual to create a heatmap table:

Thay đổi màu của dữ liệu nếu cần thiết:
Change the color of the metrix if needed:

Good luck!

Leave a comment