Power BI 中的径向仪表图Radial gauge charts in Power BI

备注

可以在 Power BI Desktop 和 Power BI 服务中创建并查看这些视觉对象。These visuals can be created and viewed in both Power BI Desktop and the Power BI service. 本文中的步骤和图示来自 Power BI Desktop。The steps and illustrations in this article are from Power BI Desktop.

径向仪表图在圆弧内显示一个值,用于度量在实现目标或关键绩效指标 (KPI) 方面的进度。A radial gauge chart has a circular arc and shows a single value that measures progress toward a goal or a Key Performance Indicator (KPI). 线(或指针 )表示目标或目标值。The line (or needle) represents the goal or target value. 底纹表示在实现目标方面的进度。The shading represents the progress toward that goal. 圆弧内的值表示进度值。The The value inside the arc represents the progress value. Power BI 沿圆弧均匀分布所有可能的值,从最小值(最左边的值)到最大值(最右边的值)。Power BI spreads all possible values evenly along the arc, from the minimum (left-most value) to the maximum (right-most value).

径向仪表的屏幕截图。

在上面的示例中,你是汽车零售商,需要跟踪销售团队的每月平均销量。In this example, you're a car retailer tracking the sales team's average sales per month. 指针表示 140 辆汽车销量目标。The needle represents a 140 cars sales goal. 平均销量最小值为 0,最大值为 200。The minimum possible average sales is 0 and the maximum is 200. 蓝色底纹显示,销售团队本月的平均销量约为 120。The blue shading shows that the team is averaging approximately 120 sales this month. 幸运的是,还有一周时间可以实现此目标。Luckily, there's still another week to reach the goal.

请观看下面的视频,Will 在其中介绍了如何创建各个指标视觉对象:仪表、卡片和 KPI。Watch Will show you how to create single metric visuals: gauges, cards, and KPIs.

备注

此视频使用较旧版本的 Power BI Desktop。This video uses an older version of Power BI Desktop.

何时使用径向仪表盘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 you can quickly scan and understand.

先决条件Prerequisites

本教程使用财务示例 Excel 文件This tutorial uses the Financial sample Excel file.

  1. 在菜单栏的左上方,选择“获取数据” > “Excel” From the upper left section of the menubar, select Get Data > Excel

  2. 查找财务示例 Excel 文件的副本Find your copy of the Financial sample Excel file

  3. 在报表视图中打开财务示例 Excel 文件 报表视图屏幕截图图标Open the Financial sample Excel file in report view Screenshot of the report view icon..

  4. 选择“financials”和“Sheet1” Select financials and Sheet1

  5. 单击“加载” Click Load

  6. 选择Select 黄色选项卡的屏幕截图。 ,以添加新报表页。to add a new page.

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

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

  1. 从空白报表页入手Start on a blank report page

  2. 在“字段” 窗格中,选择“总销售额” 。From the Fields pane, select Gross Sales.

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

    突出显示“总销售额”和“平均”聚合的“字段”窗格屏幕截图。

  4. 选择“仪表”图标Select the gauge icon “仪表”图标的屏幕截图。 ,以将柱形图转换为仪表图。to convert the column chart to a gauge chart.

    仪表图的屏幕截图。

    你看到的数字可能会与这些数字不一致,具体视你何时下载“财务示例” 文件而定。Depending on when you download the Financial Sample file, you may see numbers that don't match these numbers.

    提示

    默认情况下,Power BI 创建的仪表图假定当前值(在此示例中,为“平均总销售额” )位于仪表的中间点。By default, Power BI creates a gauge chart where it assumes the current value (in this case, Average of Gross Sales) is at the halfway point on the gauge. 由于“平均总销售额” 的值为“$182.76K”,因此起始值(最小值)设为 0,终端值(最大值)设为当前值的两倍。Since the Average of Gross Sales value 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 from the Fields pane 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.

    添加了“平均 COGS”的仪表图的屏幕截图。

    请注意,我们已经超过了我们的目标。Notice that we've exceeded our target.

    备注

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

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

在第 2 步中,Power BI 使用了“值” 字段来自动设置最小值和最大值。In Step 2, Power BI used the Value field to automatically set minimum and maximum values. 若要设置你自己的最大值,该怎么办?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 pane 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.

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

  1. 最大总销售额最大值框中删除。Remove Max of Gross Sales from the Maximum value well.

  2. 选择“滚动油漆刷”图标,以打开“格式” 窗格。Select the paint roller icon to open the Format pane.

    仪表图和突出显示“滚动油漆刷”图标的“格式”窗格屏幕截图。

  3. 展开“仪表轴” ,并在“最小值” 和“最大值” 中输入值。Expand Gauge axis and enter values for Min and Max.

    “仪表轴”选项的屏幕截图。

  4. 取消选中“字段” 窗格中的“COGS” 选项,以删除目标值。Clear the COGS option in the Fields pane to remove the target value.

    已取消选中“COGS”选项的屏幕截图。

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

    突出显示“目标值”的“仪表轴”选项屏幕截图。

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

完成这些步骤后,便会得到如下所示的仪表图:Once you're done with these steps, you'll have a gauge chart that looks something like this:

最终仪表图的屏幕截图。

下一步Next step

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