使用 Power BI 问答浏览数据并创建视觉对象Use Power BI Q&A to explore your data and create visuals

有时从你的数据中获得答案的最快方法是使用自然语言提问。Sometimes the fastest way to get an answer from your data is to ask a question using natural language. Power BI 中的问答功能,可以浏览你自己的语言中的数据。The Q&A feature in Power BI lets you explore your data in your own words. 这篇文章的第一部分演示如何在 Power BI 服务中的仪表板中使用问答。The first part of this article shows how you use Q&A in dashboards in the Power BI service. 第二部分演示如何使用问答功能时在 Power BI 服务或 Power BI Desktop 中创建报表。The second part shows what you can do with Q&A when creating reports in either the Power BI service or Power BI Desktop. 有关详细背景信息,请参阅问答的使用者一文。For more background, see the Q&A for consumers article.

在 Power BI 移动应用中的问答问答与 Power BI Embedded单独文章中介绍。Q&A in the Power BI mobile apps and Q&A with Power BI Embedded are covered in separate articles.

问答是交互式的、 甚至很有趣。Q&A is interactive, even fun. 通常情况下,一个问题会导致其他如可视化效果显示追求的有趣路径。Often, one question leads to others as the visualizations reveal interesting paths to pursue. 请观看 Amanda 是如何使用 Power BI 问答创建可视化效果、向下钻取这些视觉对象,并将它们固定到仪表板的。Watch Amanda demonstrate using Q&A to create visualizations, dig into those visuals, and pin them to dashboards.

第 1 部分:在 Power BI 服务中的仪表板上使用问答Part 1: Use Q&A on a dashboard in the Power BI service

在 Power BI 服务 (app.powerbi.com) 中,仪表板包含磁贴固定到的一个或多个数据集,以便可以询问有关的任何数据包含在这些数据集的任何问题。In the Power BI service (app.powerbi.com), a dashboard contains tiles pinned from one or more datasets, so you can ask questions about any of the data contained in any of those datasets. 若要查看的报表和数据集用于创建仪表板,请选择查看相关从菜单栏中。To see what reports and datasets were used to create the dashboard, select View related from the menu bar.


在问答问题框位于左上角的你的仪表板,你在其中键入你使用自然语言的问题。The Q&A question box is located in the upper-left corner of your dashboard, where you type your question using natural language. 看不到问答框?Don't see the Q&A box? 请参阅注意事项和故障排除问答的使用者一文。See Considerations and troubleshooting in the Q&A for consumers article. Q&a 可识别的单词,键入并找出在何处 (在哪个数据集),以便查找答案。Q&A recognizes the words you type and figures out where (in which dataset) to find the answer. “问答”还有助于你使用自动完成、重述以及其他文本和视觉对象组织你的问题。Q&A also helps you form your question with auto-completion, restatement, and other textual and visual aids.


问题的答案以交互式可视化效果显示并会在你修改问题时进行更新。The answer to your question is displayed as an interactive visualization and updates as you modify the question.

  1. 打开仪表板,并将光标置于提问框中。Open a dashboard and place your cursor in the question box. 在右上角中,选择新的问答体验In the upper-right corner, select New Q&A experience.

    Power BI 新问答体验

  2. 在开始键入前,“问答”会显示新的屏幕,上面有帮助你提问的一些建议。Even before you start typing, Q&A displays a new screen with suggestions to help you form your question. 请参阅短语和包含在基础数据集中的表的名称的完整问题和甚至可能会看到完整问题列出如果已创建数据集所有者特别推荐问题You see phrases and complete questions containing the names of the tables in the underlying datasets and may even see complete questions listed if the dataset owner has created featured questions,


    您可以选择这些问题之一作为起点并继续优化问题,以找到特定的答案。You can choose one of these questions as a starting point and continue to refine the question to find a specific answer. 或使用表名称来帮助你组织一个新问题。Or use a table name to help you word a new question.

  3. 选择从列表中的问题,或开始键入自己的问题并从下拉列表建议选择。Select from the list of questions, or begin typing your own question and select from the dropdown suggestions.


  4. 键入问题时,问答会挑选最佳的可视化效果显示答案。As you type a question, Q&A picks the best visualization to display your answer.


  5. 将问题修改动态变化,以你的可视化效果更改。The visualization changes dynamically as you modify the question.


  6. 在用户键入问题时,Power BI 会在有磁贴固定到仪表板的所有数据集中查找最佳答案。When you type a question, Power BI looks for the best answer using any dataset that has a tile on that dashboard. 如果所有磁贴都是来自 datasetA ,则答案也将来自 datasetA 。If all the tiles are from datasetA, then your answer will come from datasetA. 如果有来自磁贴datasetA源自,则问答搜索最佳答案从这 2 个数据集中。If there are tiles from datasetA and datasetB, then Q&A searches for the best answer from those 2 datasets.


    请务必谨慎,如果从仪表板中删除唯一一个源自数据集 A 的磁贴,那么问答功能将不再有权访问数据集 A 。So be careful, if you only have one tile from datasetA and you remove it from your dashboard, Q&A will no longer have access to datasetA.

  7. 当您感到满意结果固定到仪表板中右上角选择固定图标可视化效果。When you're happy with the result, pin the visualization to a dashboard by selecting the pin icon in the top right corner. 如果仪表板已与你共享,或者仪表板是应用的一部分,将无法固定。If the dashboard has been shared with you, or is part of an app, you won't be able to pin.


第 2 部分:在 Power BI 服务或 Power BI Desktop 的报表中使用 Power BI 问答Part 2: Use Q&A in a report in Power BI service or Power BI Desktop

使用 Power BI 问答可以浏览数据集,并将可视化效果添加到报表和仪表板。Use Q&A to explore your dataset and to add visualizations to the report and to dashboards. 报表是根据一个数据集创建而成,既可能是完全空白,也可能页面上有大量可视化效果。A report is based on a single dataset and may be completely blank or contain pages full of visualizations. 不过,不能仅仅因为报表是空白的,就断定其中没有任何要浏览的数据。要知道,数据集已与报表相关联,可供浏览和创建可视化效果。But just because a report is blank, doesn't mean there isn't any data for you to explore -- the dataset is linked to the report and is waiting for you to explore and create visualizations. 若要查看用于创建报表的数据集,请在 Power BI 服务的阅读视图中打开报表,并选择菜单栏中的“查看相关项” 。To see which dataset is being used to create a report, open the report in Power BI service Reading view and select View related from the menubar.


若要在报表中使用问答,必须具有编辑权限的报表和基础数据集。To use Q&A in reports, you must have edit permissions for the report and underlying dataset. 在中的使用者的问答文章中,我们将它称为创建者方案。In the Q&A for consumers article, we refer to this as a creator scenario. 如果你是相反消耗已与你,问答共享的报表不可用。If instead you're consuming a report that has been shared with you, Q&A isn't available.

  1. 在编辑视图 (Power BI 服务) 或报表视图 (Power BI Desktop) 中打开报表,并选择提出问题从菜单栏中。Open a report in Editing view (Power BI service) or Report view (Power BI Desktop) and select Ask a question from the menu bar.

    Power BI Desktop Power BI Desktop
    选择 Power BI Desktop 中提问Select Ask A Question in Power BI Desktop

    Power BI 服务 Service
    在 Power BI 服务中选择提出问题Select Ask a question in the Power BI service

  2. 此时,Power BI 问答的提问框显示在报表画布上。A Q&A question box displays on your report canvas. 在下面的示例中,提问框显示在另一个可视化效果上方。In the example below, the question box displays on top of another visualization. 虽然这没什么关系,但最好在提问前,先向报表添加空白页。This is fine, but it might be better to add a blank page to the report before asking a question.


  3. 将光标放在问题框上。Place your cursor in the question box. 在用户键入问题的同时,Power BI 问答会显示建议,以帮助用户形成自己的问题。As you type, Q&A displays suggestions to help you form your question.


  4. 在用户键入问题的同时,Power BI 问答会挑选最佳可视化效果作为答案显示;并且可视化效果会随着用户修改问题而动态变化。As you type a question, Q&A picks the best visualization to display your answer; and the visualization changes dynamically as you modify the question.


  5. 选定所需的可视化效果后,按 Enter。When you have the visualization you like, select ENTER. 若要将可视化效果与报表一起保存,请依次选择“文件”>“保存” 。To save the visualization with the report, select File > Save.

  6. 与新可视化效果进行交互。Interact with the new visualization. 无论是如何创建可视化效果的,都不要紧,因为可交互性、格式设置和功能全都完全相同。It doesn't matter how you created the visualization -- all the same interactivity, formatting, and features are available.


    如果已在 Power BI 服务中创建了可视化效果,甚至可以将它固定到仪表板If you've created the visualization in Power BI service, you can even pin it to a dashboard.

告知问答要使用哪个可视化效果Tell Q&A which visualization to use

使用 Power BI 问答,不仅可以让数据为自己“发声”,还可以指示 Power BI 如何显示答案。With Q&A, not only can you ask your data to speak for itself, you can tell Power BI how to display the answer. 只需将“以显示”添加到问题的末尾即可。Just add "as a " to the end of your question. 例如,“显示工厂的库存量(以地图形式)”和“显示总库存(以卡片形式)”。For example, "show inventory volume by plant as a map" and "show total inventory as a card". 亲自动手。Try it for yourself.

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

  • 如果已使用实时连接或网关连接到数据集,需要为相应数据集启用 Power BI 问答。If you've connected to a dataset using a live connection or gateway, Q&A needs to be enabled for that dataset.

  • 如果已打开报表,但看不到 Power BI 问答选项。You've opened a report and don't see the Q&A option. 如果使用的是 Power BI 服务,请务必在编辑视图中打开报表。If you're using Power BI service, make sure the report is open in Editing view. 如果您不能打开编辑视图,这意味着你没有编辑该报表的权限和特定报表,可以使用问答。If you can't open Editing view it means you don't have edit permissions for that report and you can use Q&A with that specific report.

后续步骤Next steps