Power BI 中的径向仪表图表(教程)Radial gauge charts in Power BI (Tutorial)

径向仪表盘有一个圆弧,并且显示单个值,该值用于衡量针对目标/KPI 的进度。A radial gauge chart has a circular arc and displays a single value that measures progress toward a goal/KPI. 使用直线(针)表示目标或目标值。The goal, or target value, is represented by the line (needle). 使用明暗度表示针对目标的进度。Progress toward that goal is represented by the shading. 表示进度的值在圆弧内以粗体显示。所有可能的值沿圆弧均匀分布,从最小值(最左边的值)到最大值(最右边的值)。And the value that represents that progress is shown in bold inside the arc. All possible values are spread evenly along the arc, from the minimum (left-most value) to the maximum (right-most value).

在下面的示例中,我们是汽车零售商,需要跟踪销售团队每月的平均销量。In the example below, we are a car retailer, tracking our Sales team's average sales per month. 我们的目标是 140,用黑色针表示。Our goal is 140 and represented by the black needle. 可能的最小平均销量为 0,我们已将最大值设为 200。The minimum possible average sales is 0 and we've set the maximum as 200. 蓝色显示本月的平均销量接近 120。The blue shading shows that we're currently averaging approximately 120 sales this month. 幸运的是,我们仍有一周的时间来实现这一目标。Luckily, we still have another week to reach our goal.

何时使用径向仪表盘When to use a radial gauge

径向仪表适用情况:Radial gauges are a great choice to:

  • 显示某个目标的进度。show progress toward a goal.
  • 表示百分比指标值,如 KPI。represent a percentile measure, like a KPI.
  • 显示单个指标的健康状况。show the health of a single measure.
  • 显示可以快速扫描和理解的信息。display information that can be quickly scanned and understood.

先决条件Prerequisites

创建基本的径向仪表盘Create a basic radial gauge

本文中的说明将使用 Power BI 服务。These instructions use Power BI service. 若要跟着介绍一起操作,请登录 Power BI,并打开“Excel 财务示例”文件。To follow along, sign in to Power BI and open the Excel Financial Sample file.

或观看 Will 介绍如何创建单个指标视觉:仪表、卡片和 KPI。Or watch Will show you how to create single metric visuals: gauges, cards, and KPIs.

第 1 步:打开“Excel 财务示例”文件Step 1: Open the Financial Sample Excel file

  1. 下载“Excel 财务示例”文件(如果还没有的话)。Download the sample Financial Excel file if you haven't already. 记住此文件的保存位置。Remember where you saved it.

  2. 在 Power BI 服务中打开此文件,具体方法是依次选择“获取数据”>“文件”,并转到此文件的保存位置。Open the file in Power BI service by selecting Get Data > Files and browsing to the location where you saved the file. 选择“导入”。Select Import. 会将该财务示例作为数据集添加到你的工作区。The Financial Sample is added to your workspace as a dataset.

  3. 在“数据集”内容列表中,选择“财务示例”,在浏览模式下打开它。From the Dataset content list, select Financial Sample to open it in Explore mode.

步骤 2:创建仪表盘来跟踪总销售额Step 2: Create a gauge to track Gross Sales

  1. 字段窗格中,选择总销售额In the Fields pane, select Gross Sales.

  2. 将聚合函数更改为平均值Change the aggregation to Average.

  3. 选择仪表盘图标 将柱形图转换为一个仪表盘。Select the gauge icon to convert the Column Chart to a gauge.

    默认情况下,Power BI 创建的仪表盘的当前值(在本例中为平均总销售额)假定在仪表盘的中间点上。By default, Power BI creates a Gauge chart where the current value (in this case, Average of Gross Sales) is assumed to be at the halfway point on the gauge. 由于平均总销售额为 $182.76K,因此起始值(最小值)设为 0,结束值(最大)设为双倍的当前值。Since the Average Gross Sales is $182.76K, the start value (Minimum) is set to 0 and the end value (Maximum) is set to double the current value.

步骤 3:设置目标值Step 3: Set a target value

  1. COGS 拖放到目标值框。Drag COGS to the Target value well.
  2. 将聚合函数更改为平均值Change the aggregation to Average. Power BI 添加了一个针用于表示我们的目标值 $145.48KPower BI adds a needle to represent our target value of $145.48K. 请注意,我们已经超过了我们的目标。Notice that we've exceeded our target.

    备注

    也可以手动输入目标值。You can also manually enter a target value. 请参阅下文的“使用格式选项手动设置最小值、最大值和目标值”。See "Use formatting options to manually set Minimum, Maximum, and Target values" below.

步骤 4:设置最大值Step 4: Set a maximum value

在步骤 2 中,Power BI 使用“值”字段自动设置最小值(起始)和最大值(结束)。In Step 2, Power BI used the Value field to automatically set minimum (start) and maximum (end). 但是如果你想要设置自己的最大值应如何操作?But what if you want to set your own maximum value? 举例来说,将最大值设置为数据集中的最大总销售额,而不使用双倍的当前值作为可能的最大值。Let's say that instead of using double the current value as the maximum possible value, you want to set it to the highest Gross Sales number in your dataset?

  1. 字段列表中的总销售额拖放到最大值框。Drag Gross Sales from the Fields list to the Maximum Value well.
  2. 将聚合函数更改为最大值Change the aggregation to Maximum.

    将重新绘制仪表盘,其新的结束值为总销售额 121 万。The gauge is redrawn with a new end value, 1.21 million in gross sales.

步骤 5:保存报表Step 5: Save your report

  1. 保存报表Save the report.
  2. 将仪表盘添加为仪表板磁贴Add the gauge chart as a dashboard tile.

使用格式选项手动设置最小值、最大值和目标值Use formatting options to manually set Minimum, Maximum, and Target values

  1. 最大总销售额最大值框中删除。Remove Max of Gross Sales from the Maximum value well.
  2. 选择滚动油漆刷图标,打开“格式”窗格。Open the formatting pane by selecting the paint roller icon.

  3. 展开仪表盘轴,然后输入最小值最大值Expand the Gauge axis and enter values for Min and Max.

  4. 通过取消选中 COGS 旁边的复选标记来删除当前的目标值。Remove the current target value by removing the checkmark next to COGS.

  5. 仪表盘轴下方显示目标值字段时,请输入一个值。When the Target field appears under Gauge axis, enter a value.

  6. 或者,继续设置仪表盘的格式。Optionally, continue formatting your gauge chart.

后续步骤Next steps

Power BI 中的可视化效果类型Visualization types in Power BI

向报表添加可视化效果Add a visualization to a report

将可视化效果固定到仪表板Pin a visualization to a dashboard

Power BI - 基本概念 Power BI - Basic Concepts

更多问题?More questions? 尝试参与 Power BI 社区Try the Power BI Community