使 Excel 数据很好地配合 Power BI 问答Make Excel data work well with Q&A in Power BI

如果你是创建数据模型或生成用于 Power BI 的 Excel 工作簿的人员,请阅读...If you are a person who creates data models or builds Excel workbooks that will be used with Power BI, read on...

在 Power BI 中,“问答”可以搜索结构化数据,然后针对你的问选择合适的可视化效果 — 这让它成为一种极具吸引力的工具。In Power BI, Q&A can search structured data and choose the right visualization for your question -- that's what makes it a compelling tool to use.

“问答”适用于任何已上传的具有表格、范围或包含 PowerPivot 模型的 Excel 文件,但执行的优化和数据清理越多,“问答”性能就越可靠。Q&A can work on any uploaded Excel file that has tables, ranges, or contains a PowerPivot model, but the more optimizations and data cleaning you do, the more robust Q&A performance is. 如果打算共享根据数据集创建而成的报表和仪表板,不妨方便同事能够轻松提问,并获取优质答案。If you plan on sharing reports and dashboards based on your dataset, you'll want your colleagues to have an easy time asking questions and getting quality answers.

如何结合使用 Power BI 问答和 ExcelHow Q&A works with Excel

“问答”具有一套核心的自然语言理解功能,可以处理你的数据。Q&A has a set of core natural language understanding abilities that work across your data. 它还具有针对 Excel 表、列和计算的字段名称的上下文相关关键字搜索功能。It has context-dependent keyword search for your Excel table, column, and calculated field names. 它还内置了有关如何筛选、排序、聚合、分组和显示数据的信息。It also has built-in knowledge for how to filter, sort, aggregate, group, and display data.

例如,在名为“Sales”的 Excel 表中,其中含有“Product”、“Month”、“Units Sold”、“Gross Sales”和“Profit”列,你可以询问有关这些实体的问题。For example, in an Excel table named “Sales”, with columns “Product”, “Month”, “Units Sold”, “Gross Sales”, and “Profit”, you could ask questions about any of those entities. 你可以要求按月显示销售额和总利润、按销售件数对产品排序等其他功能。You could ask to show sales, total profit by month, sort products by units sold, and many others. 详细了解仪表板和报表中使用问答,并可以在问答查询中指定的可视化效果类型Read more about using Q&A in dashboards and reports, and visualization types you can specify in a Q&A query.

准备 Excel 数据集以供 Power BI 问答使用Prepare an Excel dataset for Q&A

“问答”依靠表格、列和计算字段的名称来回答特定于数据的问题,这意味着,实体在工作簿中的命名很重要!Q&A relies on the names of tables, columns, and calculated fields to answer data-specific questions, meaning what you call entities in your workbook is important!

以下是有关充分利用工作簿中的“问答”的一些提示。Here are some tips for making the most of Q&A in your workbook.

  • 请确保你的数据在 Excel 表中。Make sure your data is in an Excel table. 下面是 how to create an Excel table(如何创建 Excel 表)。Here's how to create an Excel table.

  • 确保表、列和计算字段的名称通俗易懂。Make sure the names of your tables, columns, and calculated field make sense in natural speech.

    例如,如果表格中含有销售数据,请将此表命名为“Sales”。For example, if you have a table with sales data, call the table “Sales”. 像“Year”、“Product”、“Sales Rep”和“Amount”等列名称对“问答”也很适用。Column names like “Year”, “Product”, “Sales Rep”, and “Amount” will work well with Q&A.

  • 如果你的工作簿具有 Power Pivot 数据模型,则可以执行更多优化操作。If your workbook has a Power Pivot data model, you can do even more optimizations. 详细阅读有关我们内部的自然语言专家所提供的 Demystifying Power BI问答part 2(阐述 Power BI 问答(第 2 部))。Read more about Demystifying Power BI Q&A part 2 from our in-house team of natural language experts.

  • 在 Power BI Desktop 中打开数据集,然后新建列、创建计算度量值、连接字段以创建唯一值、按类型(例如,日期、字符串、地理位置、图像、URL)对数据进行分类等。Open the dataset in Power BI Desktop and create new columns, create calculated measures, concatenate fields to create unique values, classify data by type (e.g., dates, strings, geography, images, URLs), and more.

后续步骤Next steps

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