使用 Power BI Desktop 中的“分析”窗格Using the Analytics pane in Power BI Desktop

通过 Power BI Desktop 的“分析”窗格,你可以向视觉对象添加动态参考行,并重点关注重要趋势或见解。With the Analytics pane in Power BI Desktop, you can add dynamic reference lines to visuals, and provide focus for important trends or insights. 从 2016 年 8 月版本(版本 2.37.4464.321 或更高版本)开始,“分析”窗格位于 Power BI Desktop 区域的“可视化效果”中,如下所示。The Analytics pane is found in the Visualizations area of Power BI Desktop, beginning with the August 2016 release (version 2.37.4464.321 or later), as shown below.

备注

仅当在 Power BI Desktop 画布上选择视觉对象时才会显示“分析”窗格。The Analytics pane only appears when you select a visual on the Power BI Desktop canvas.

启用预测(预览)Enable Forecasting (Preview)

此外,使用 Power BI Desktop(版本 2.39.4526.362 或更高)的 2016 年 9 月版本,你还可以从“分析”窗格中执行“预测”。In addition, with the September 2016 release of Power BI Desktop (version 2.39.4526.362 or later), you can also perform forecasting from the Analytics pane. 必须启用此预览功能,方法是转到“文件”>“选项和设置”>“选项”,然后从左侧窗格中选择“预览功能”。You must enable this preview feature, by going to File > Options and settings > Options then selecting Preview Features from the left pane. 选中“预测”旁边的复选框来启用此功能,如下图所示。Select the checkbox next to Forecasting to enable the feature, as shown in the following image. 必须重启 Power BI Desktop 才能使更改生效。You'll need to restart Power BI Desktop for your changes to take effect.

使用分析窗格Using the Analytics pane

通过“分析”窗格,可以创建以下类型的动态参考行(并非所有的行都适用于所有视觉对象类型):With the Analytics pane, you can create the following types of dynamic reference lines (not all lines are available for all visual types):

  • X 轴恒线X-Axis constant line
  • Y 轴恒线Y-Axis constant line
  • 最小值线Min line
  • 最大值线Max line
  • 平均线Average line
  • 中线Median line
  • 百分位数线Percentile line

以下各部分介绍如何在可视化效果中使用“分析”窗格和动态参考行。The following sections show how you can use the Analytics pane and dynamic reference lines in your visualizations.

若要查看视觉对象的可用动态参考行,请按照下列步骤操作:To view the available dynamic reference lines for a visual, follow these steps:

  1. 选择或创建视觉对象,然后从“可视化效果”部分选择“分析”图标。Select or create a visual, then select the Analytics icon from the Visualizations section.

  2. 为想要创建的行类型选择向下箭头以展开其选项。Select the down arrow for the type of line you want to create to expand its options. 本示例中将选择“平均线”。In this case, we'll select Average Line.

  3. 若要创建一个新行,请选择“+ 添加”。To create a new line, select + Add. 然后,可以通过双击文本框,键入名称来为行指定名称。You can then specify a name for the line by double-clicking the text box, then typing in your name.

    对于行提供了各种选项,例如可以选择其“颜色”、“透明度”、“样式”和“位置”(与视觉对象的数据元素有关),以及是否包括标签。You have all sorts of options for your line, such as selecting its color, transparency, style and position (relative to the visual's data elements), and whether to include the label. 重要的是,通过选择“度量值”下拉列表,可以选择想要行基于视觉对象中的哪个度量值,它会自动使用视觉对象中的数据元素予以填充。And importantly, you can select which Measure in the visual you want your line to be based upon by selecting the Measure drop down, which is automatically populated with data elements from the visual. 本示例中将选择“天气”作为度量值,对其设置“平均天气”标签,并对其他几个选项进行自定义,如下所示。In this case, we'll select Weather as the measure, label it Average Weather, and customize a few of the other options as shown below.

  4. 如果想要显示数据标签,请将“数据标签”滑块移至开启状态。If you want to have a data label appear, move the Data label slider on. 执行此操作可以为数据标签获取大量其他选项,如下图所示。When you do so, you get a whole host of additional options for your data label, as shown in the following image.

  5. 请注意“分析”窗格中的“平均线”项旁显示的数目。Notice the number that appears next to the Average line item in the Analytics pane. 它指出目前在视觉对象上所拥有的动态行的数量和类型。That tells you how many dyanmic lines you currently have on your visual, and of which type. 如果为“生活成本”添加了“最大值线”,则可以看到“分析”窗格显示现在也有适用于该视觉对象的“最大值线”动态参考行。If we add a Max line for Cost of Living, you can see that the Analytics pane shows that we now also have a Max line dynamic reference line applied to this visual.

如果所选择的视觉对象不能具有对其适用的动态参考行(本示例中为映射视觉对象),则会在选择“分析”窗格时看到以下信息。If the visual you've selected can't have dynamic reference lines applied to it (in this case, a Map visual), you'll see the following when you select the Analytics pane.

通过使用“分析”窗格创建动态参考行,可以突出显示各种有趣的见解。There are all sorts of interesting insights you can highlight by creating dynamic reference lines with the Analytics pane.

我们正在计划开发更多的特性和功能,其中包括扩展可以具有适用动态参考行的视觉对象,因此请经常查看其新增功能。We're planning more features and capabilities, including expanding which visuals can have dynamic reference lines applied to them, so check back often for what's new.

应用预测Apply Forecasting

选择可视化对象,然后展开“分析”窗格的“预测”部分即可使用“预测”功能。You can use the Forecast feature by selecting a visual, then expanding the Forecast section of the Analytics pane. 可以指定多个输入以修改预测,例如预测长度、置信区间等。You can specify many inputs to modify the forecast, such as the Forecast length, the Confidence interval, and others. 下图显示了已应用预测功能的基本行视觉对象,你可以使用自己的想象力(并使用预测功能)来查看它是如何应用到你的模型的。The following image shows a basic line visual with forecasting applied, but you can use your imagination (and play around with the forecasting feature) to see how it can apply to your models.

限制Limitations

是否能使用动态参考行取决于正在使用的视觉对象的类型。The ability to use dynamic reference lines is based on the type of visual being used. 下表显示动态行当前适用的视觉对象:The following list shows which dynamic lines are currently available for which visuals:

动态行完全适用于以下视觉对象:Full use of dynamic lines are available on the following visuals:

  • 分区图Area chart
  • 折线图Line chart
  • 散点图Scatter chart
  • 簇状柱形图Clustered Column chart
  • 簇状条形图Clustered Bar chart

以下视觉对象仅能使用“分析”窗格中的恒线:The following visuals can use only a constant line from the Analytics pane:

  • 堆积面积图Stacked Area
  • 堆积条形图Stacked Bar
  • 堆积柱形图Stacked Column
  • 百分比堆积条形图100% Stacked Bar
  • 百分比堆积柱形图100% Stacked Column

对于以下视觉对象,趋势线是当前仅有的选项:For the following visuals, a trend line is currently the only option:

  • 非堆积折线图Non-stacked Line
  • 簇状柱形图Clustered Column chart

最后,非笛卡尔视觉对象当前无法应用“分析”窗格中的动态行,例如:Lastly, non-Cartesian visuals cannot currently apply dynamic lines from the Analytics pane, such as:

  • 矩形图Matrix
  • 饼图Pie chart
  • 圆环图Donut
  • Table

后续步骤Next steps

Power BI Desktop 可用于执行多种操作。There are all sorts of things you can do with Power BI Desktop. 有关其功能的详细信息,请参阅下列资源:For more information on its capabilities, check out the following resources: