关键绩效指标 (KPI) 视觉对象Key Performance Indicator (KPI) visuals

备注

可以在 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 Key Performance Indicator (KPI) is a visual cue that communicates the amount of progress made toward a measurable goal. 若要详细了解 KPI,请参阅 PowerPivot 中的关键绩效指标 (KPI)For more about KPIs, see Key Performance Indicators (KPIs) in PowerPivot.

请观看下面的视频,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.

何时使用 KPIWhen to use a KPI

当存在以下情况时,KPI 是一个不错的选择:KPIs are a great choice:

  • 若要度量进度。To measure progress. 回答问题:“我是领先还是落后?”Answers the question, "What am I ahead or behind on?"

  • 若要度量与目标的距离。To measure distance to a goal. 回答问题:“我领先或落后了多远?”Answers the question, "How far ahead or behind am I?"

KPI 要求KPI requirements

设计人员将 KPI 视觉对象建立在特定度量值的基础上。A designer bases a KPI visual on a specific measure. KPI 旨在根据已定义目标来评估指标的当前值和状态。The intention of the KPI is to help you evaluate the current value and status of a metric against a defined target. KPI 视觉对象需要用于评估值的基础 度量值、目标 度量值或值,以及阈值 或目标 。A KPI visual requires a base measure that evaluates to a value, a target measure or value, and a threshold or goal.

KPI 数据集需要包含 KPI 目标值。A KPI dataset needs to contain goal values for a KPI. 如果数据集不包含目标值,你可以创建它们,具体方法是向数据模型或 PBIX 文件添加含目标的 Excel 工作表。If your dataset doesn't contain goal values, you can create them by adding an Excel sheet with goals to your data model or PBIX file.

先决条件Prerequisites

本教程使用零售分析示例 PBIX 文件This tutorial uses the Retail Analysis sample PBIX file.

  1. 在菜单栏的左上方,选择“文件” > “打开” From the upper left section of the menubar, select File > Open

  2. 查找零售分析示例 PBIX 文件的副本Find your copy of the Retail Analysis sample PBIX file

  3. 在报表视图中打开“零售分析示例 PBIX 文件” 。Open the Retail Analysis sample PBIX file in report view. 报表视图图标的屏幕截图。Screenshot of the report view icon.

  4. 选择 + 来添加新页面 。Select + to add a new page. 黄色选项卡的屏幕截图。Screenshot of the yellow tab.

如何创建 KPIHow to create a KPI

此示例将创建一个 KPI,用于度量在实现销售目标方面的进度。In this example, you'll create a KPI that measures the progress you've made toward a sales goal.

  1. 在“字段” 窗格中,依次选择“销售额”>“今年总销售单位数” 。From the Fields pane, select Sales > Total Units This Year. 此值为指标。This value will be the indicator.

  2. 添加“时间”>“财政月” 。Add Time > FiscalMonth. 此值表示趋势。This value will represent the trend.

  3. 选择视觉对象右上角的省略号,并检查 Power BI 是否按“会计月份” 升序排序柱形。In the upper-right corner of the visual, select the ellipsis and check that Power BI sorted the columns in ascending order by FiscalMonth.

    重要

    将可视化效果转换为 KPI 后,便无 排序选项。Once you convert the visualization to a KPI, there's no option to sort. 必须现在进行正确排序。You must sort it correctly now.

    同时选择了“升序排序”和“会计月份”的已展开省略号菜单的屏幕截图。

    正确排序后,视觉对象如下所示:Once sorted correctly, your visual will look like this:

    正确排序的视觉对象的屏幕截图。

  4. 选择“可视化效果” 窗格中的“KPI” 图标,将视觉对象转换为 KPI。Convert the visual to a KPI by selecting the KPI icon from the Visualization pane.

    突出显示“KPI”的“可视化效果”窗格屏幕截图。

  5. 若要添加目标,请将“去年总销售单位数” 拖到“目标” 字段中。To add a goal, drag Total Units Last Year to the Target goals field.

    已完成 KPI 视觉对象和包含描述值的“字段”窗格的屏幕截图。

  6. 你也可以根据需要选择滚动油漆刷图标打开“格式”窗格来设置 KPI 格式。Optionally, format the KPI by selecting the paint roller icon to open the Formatting pane.

    • 指标 - 控制指标的显示单位和小数位数。Indicator - controls the indicator’s display units and decimal places.

    • 趋势轴 - 如果设置为“开” ,视觉对象将趋势轴显示为 KPI 视觉对象的背景。Trend axis - when set to On, the visual shows the trend axis as the background of the KPI visual.

    • 目标 - 如果设置为“开” ,视觉对象显示目标,以及与目标的距离百分比。Goals - when set to On, the visual shows the goal and the distance from the goal as a percentage.

    • 颜色编码 > 方向 - 人们认为一些 KPI 值越高越好 ,而另一些 KPI 值则越低越好 。Color coding > Direction - people consider some KPIs better for higher values and consider some better for lower values. 例如,收入与等待时间。For example, earnings versus wait time. 通常更高的收入值好于更高的等待时间值。Typically a higher value of earnings is better versus a higher value of wait time. 选择“越高越好” ,并视需要更改颜色设置。Select high is good and, optionally, change the color settings.

KPI 也适用于 Power BI 服务和移动设备。KPIs are also available in the Power BI service and on your mobile devices. 这样,可以始终连接到业务检测信号。It gives you the option to be always connected to your business's heartbeat.

注意事项和疑难解答Considerations and troubleshooting

如果 KPI 并非如上所示,可能是因为你未按“会计月份” 进行排序。If your KPI doesn't look like the one above, it may be because you didn't sort by FiscalMonth. KPI 没有排序选项。KPIs don't have a sort option. 必须重新开始,并先按“会计月份” 排序,再 将可视化效果转换为 KPI。You'll need to start again and sort by FiscalMonth before you convert your visualization to a KPI.

后续步骤Next steps

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