知識庫

Create a Risk-Impact Heat Map


發佈時間 : 13 Jul 2015
上次修改日期 : 20 Jul 2023

問題

How to create a heat map that demonstrates risk impact.

環境

Tableau Desktop

答案

Option 1

Use a background image of the gradient under a previously created scatter plot. For more information, see Background Images.

Option 2

Use table calculations to fill in the view even when no data exists. The following instructions use bins to create discrete dimensions and can be reviewed in the attached workbook.

Step 1: Create the Base View
  1. Right-click on Risk and select Create > Bins….
  2. Set the Size of bins to 10 and click OK.
  3. Right-click on Impact and select Create > Bins….
  4. Set the Size of bins to 10 and click OK.
  5. Drag Risk (bin) to the Rows shelf and Impact (bin) to the Columns shelf.
  6. Right-click on Risk (bin) on the Rows shelf and select Sort.
  7. Select Descending and click OK.
  8. Right-click and drag Name from Dimensions to the Label card.
  9. Right-click Name on the Label card and select Measure > Count (Distinct).
Step 2: Create the Color Measure
  1. Create the following calculated fields:
    • Name: hIndex          Formula: INDEX()
    • Name: vIndex          Formula: 1 + SIZE() - INDEX()
    • Name: xSumIndex   Formula: [hIndex] + [vIndex]
  1. Drag xSumIndex to the Color card.
  2. Right-click on xSumIndex on the Marks card and select Edit Table Calculation….
  3. From the Calculated Field drop-down menu, select vIndex.
  4. From the Compute Using drop-down menu, select Table (Down).
  5. From the Calculated Field drop-down menu, select hIndex.
  6. From the Compute Using drop-down menu, select Table (Across).
  7. Click OK.
  8. On the Marks card, click the Color and select Edit Colors….
  9. Select Red-White-Green Diverging from the Palette drop-down menu.
  10. Click Reversed.
  11. Click OK.
這篇文章是否解決了問題?