使用 Power BI 服务或 Power BI Desktop 为 Cortana 创建自定义回复页Use Power BI service or Power BI Desktop to create a custom Answer Page for Cortana

使用 Power BI 的全部功能创建专为回答 Cortana 问题而设计的专用报表页,称为“Cortana 回复页”(有时称为“Cortana 回复卡”)。Use the full capabilities of Power BI to create special report pages, called Cortana answer pages (and sometimes called "Cortana answer cards") designed specifically to answer Cortana questions.

重要

如果你尝试预览 Cortana 和 Power BI 仪表板,则可以跳过本文的其余部分。If you are trying out the Cortana and Power BI dashboard preview, you can skip the rest of this article. 无需对 Cortana 进行任何设置即可搜索 Power BI 仪表板。There are no setup requirements for Cortana to be able to search your Power BI dashboards.

开始之前Before you begin

我们有 4 个文档可以指导你完成设置和使用 Power BI 的 Cortana。We have 4 documents that guide you through setting up and using Cortana for Power BI. 如果尚未这样做,我们建议你首先阅读项目文章 1。If you haven't already, we recommend that you start by reading article 1. 文章 2 尤其重要,因为它说明了在你开始使用 Cortana 回复页之前需要执行的一些步骤。And article 2 is especially important because it describes some steps you'll need to take before you can begin using Cortana answer pages.

文章 1了解 Cortana 和 Power BI 如何协同工作Article 1 Learn how Cortana and Power BI work together

文章 2对于搜索 Power BI 报表:启用 Cortana - Power BI - Windows 集成Article 2: For searching Power BI reports: Enable the Cortana - Power BI - Windows integration

文章 3:本文Article 3: This article

文章 4解决问题Article 4: Troubleshoot issues

创建专为 Cortana 设计的 Cortana 回复页Create a Cortana answer page designed specifically for Cortana

报表中的 Cortana 回复页的大小专为 Cortana 而设,以便 Cortana 可以在屏幕中将其显示为某个问题的答案。A Cortana answer page in a report is sized specifically for Cortana so that Cortana can display it in-screen as an answer to a question. 为 Cortana 创建回复页:To create an answer page for Cortana:

  1. 我们建议从空白报表页开始。We recommend starting with a blank report page.
  2. 在“可视化效果”窗格中,选择滚动油漆刷图标,然后选择“页面大小 > 类型 > Cortana”。In the Visualizations pane, select the paint roller icon and choose Page Size > Type > Cortana.

  3. 创建一个或一组想要在 Cortana 中显示的视觉对象,以用于响应特定问题(或多个问题)。Create a visual or a set of visuals that you want to appear in Cortana in response to a particular question (or set of questions).
  4. 确保所有视觉对象都能放在页边框内。Ensure that all visuals fit within the page borders. 可选择性地修改显示设置、数据标签、颜色和背景。Optionally, modify display settings, data labels, colors, and backgrounds.

  5. 命名该页面并添加替代名称。Name the page and add alternate names. Cortana 在搜索结果时将使用这些名称。Cortana uses these names when it searches for results. 可视化效果窗格中,选择画笔图标,然后选择页面信息In the Visualizations pane, select the paintbrush icon and choose Page Information. 通过移动滑块至“开”,启用此视觉对象的问答。Enable Q&A for this visual by moving the slider to On.

    提示

    若要改进结果,应避免使用还是列名称的词汇。To improve results, avoid using words that are also column names.

  6. 如果报表有页面级别筛选器,可选择性地设置“需要单选”。Optionally, if your report has page level filters, you may want to set Require single selection. 如果问题中只指定了一个,唯一一个筛选器项,则 Cortana 仅会将此报表显示为答案。Cortana will only display this report as an answer if one, and only one, of the filter items is specified in the question. 可以在“筛选器”窗格的底部找到“需要单选”。Require single selection can be found at the bottom of the Filters pane.

    备注

    无需设置“需要单选”即可要求 Cortana 显示带有页面级筛选器的报表。You don't have to set Require single selection to ask Cortana to display a report with page level filters. 例如,无论“需要单选”设置如何,说出“显示 Charlotte Lindseys 的销售额”都可以显示答案页。For example “show sales for Charlotte Lindseys” will display the answer page regardless of the Require Single Selection setting.

    例如,如果你问 Cortana:For example, if you ask Cortana:

    • “按零售店名称显示销售额,”此回复页将不会显示,因为你未在所需的页面级别筛选器中包含任何项。"show sales by store name," this answer page will not appear because you did not include any of the items in the required page level filter.
    • “显示 Cary Lindseys 和 Charlotte Lindseys 的销售额,”此回复页将不会显示,因为你从所需的页面级别筛选器中指定了多个项。"show sales for Cary Lindseys and Charlotte Lindseys," this answer page will not appear because you specified more than one item from the required page level filter.
    • “显示 Charlotte Lindseys 的销售额,”此回复页将显示。"show sales for Charlotte Lindseys," this answer page will display.

      =“显示销售额”此回复页将不会显示,因为你未在所需的页面级别筛选器中包含任何项。= "show sales" this answer page will not appear because you didn't include any of the items in the required page level filter.

重要

在 Cortana 可访问 Cortana 回复页之前,需要启用 Cortana 数据集Before your Cortana answer page can be accessed by Cortana, you will need to Enable the dataset for Cortana.

Cortana 如何对结果进行排序?How does Cortana order the results?

具有高分答案的结果(如指定页面名称的完全匹配项)将在 Cortana 中以 最佳匹配 第一个显示。Results with high scoring answers (such as a complete match of a specified page name) will appear first as a best match in Cortana. 如果 Power BI 中有多个 Cortana 回复页,则可能显示多个最佳匹配项。Multiple best matches can appear if there are multiple Cortana answer pages in Power BI. 中等或较低评分的答案(例如不基于回复页名称的答案或具有 Power BI 无法理解的字词的问题)将在 Cortana 的最佳匹配项的下面作为链接列出。Medium or lower scoring answers, such as answers not based on the name of an answer page or a question with words not understood by Power BI, are listed as links below best matches in Cortana.

备注

将新的数据集或自定义 Cortana 回复页添加到 Power BI 并为 Cortana 启用时,可能需要 30 分钟,结果才会开始出现于 Cortana 中。When a new dataset or custom Cortana answer page is added to Power BI and enabled for Cortana it can take up to 30 minutes for results to begin appearing in Cortana. 登录或退出 Windows 10 或者在 Windows 10 中重启 Cortana 进程都能使新内容立刻显示。Logging in and out of Windows 10, or otherwise restarting the Cortana process in Windows 10, will allow new content to appear immediately.

后续步骤Next steps

将 Cortana 和 Power BI 搭配使用Using Cortana with Power BI

仍无法让 Cortana 与 Power BI 协同工作?Still can't get Cortana to work with Power BI? 请尝试查阅 Cortana 疑难解答Try the Cortana troubleshooter.

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