本文共 10232 字,大约阅读时间需要 34 分钟。
In this article, we are going to learn how to use Power BI Desktop Q&A functionality to enable users to ask the question from the data set and easily get the results without any configuration or write complex codes.
在本文中,我们将学习如何使用Power BI Desktop问答功能使用户能够从数据集中提出问题,并且无需任何配置或编写复杂代码即可轻松获得结果。
In today’s digital world, we are moving towards more interactions with the data with natural language. You might be familiar with the Amazon’s Alexa Microsoft Cortana or the Apple’s Siri. Natural language helps the users to communicate with our data set in a friendly way. If we can implement the interactions using natural language in the business intelligence system, it would be convenient to deal with complex data. We do not need to write complex queries, create visualization every time as per the user’s requirements.
在当今的数字世界中,我们正在朝着与自然语言的数据进行更多交互的方向发展。 您可能熟悉亚马逊的Alexa Microsoft Cortana或苹果的Siri。 自然语言可以帮助用户以友好的方式与我们的数据集进行交流。 如果我们可以在商务智能系统中使用自然语言来实现交互,那么处理复杂数据将很方便。 我们不需要编写复杂的查询,也不需要每次都根据用户要求创建可视化。
In Power BI Desktop, we can talk with the data using the Q & A feature. We can ask questions and get the data, visualizations with this natural language. When we ask questions using the Q & A functionality in natural language, Power BI creates the data or visualizations based on the keywords. It generates the visualization as per the keywords. This is a very quick process and we get the result very fast. We should create the data set and its columns with functional meaning. It would be easy for the users to understand the data set and ask the questions effectively. We need to understand the difference between the search engine and the Q&A functionality. In a search engine, we search data across the web but Q& A gives results from the data set used in the Power BI Desktop report.
在Power BI Desktop中,我们可以使用“问答”功能与数据对话。 我们可以用这种自然语言提出问题并获得数据和可视化效果。 当我们使用自然语言的“问与答”功能提问时,Power BI会基于关键字创建数据或可视化。 它根据关键字生成可视化。 这是一个非常快的过程,我们可以很快得到结果。 我们应该创建具有功能含义的数据集及其列。 用户很容易理解数据集并有效地提出问题。 我们需要了解搜索引擎和问答功能之间的区别。 在搜索引擎中,我们在整个网络上搜索数据,但“问答”给出了Power BI Desktop报告中使用的数据集的结果。
In Power BI, Q&A currently works only if the data model is having the imported data. If we are using the live connections to SQL Server Analysis Service (Cube) or direct query to data, we cannot use the Q&A.
在Power BI中,仅当数据模型具有导入的数据时,Q&A当前有效。 如果我们使用到SQL Server Analysis Service(多维数据集)的实时连接或对数据的直接查询,则不能使用“问答”。
Power BI currently supports asking natural language questions in English. Let us explore this functionality in a practical way.
Power BI当前支持用英语询问自然语言问题。 让我们以实用的方式探索此功能。
In this example, we will use the sample dashboard available at the Microsoft . We will use Q& A functionality in the Power BI Desktop, therefore, download the .pbix file from the link mentioned above.
在此示例中,我们将使用Microsoft 提供的示例仪表板。 我们将在Power BI桌面中使用问答功能,因此,请从上述链接下载.pbix文件。
Let me give a brief introduction to the sample data used in the report. This sample contains a sales and marketing dashboard for the manufacturing company. It contains multiple dashboards to visualize the company market share, sentiments, and Growth Opportunities.
让我简要介绍一下报告中使用的示例数据。 此样本包含制造公司的销售和营销仪表板。 它包含多个仪表板,以可视化公司的市场份额,情绪和增长机会。
Below is the screenshot from the visual.
下面是视觉截图。
In this report, you can see we have the following charts
在此报告中,您可以看到我们有以下图表
In the Power BI Desktop menu bar, you can see the icon ‘Ask a Question’.
在Power BI Desktop菜单栏中,您可以看到“问问题”图标。
Click on this icon and it launches the Q&A pop up box in the report.
单击此图标,它将启动报告中的“问答”弹出框。
It also launches a window where it would display data or create visualizations. Adjust the size of this window and make some room in the report to display data properly.
它还会启动一个窗口,在其中显示数据或创建可视化效果。 调整此窗口的大小,并在报表中留出一些空间以正确显示数据。
Let us start interaction with our data in natural language. When we start typing in the text box, it gives suggestion inline as well. In below example, you can see that once we type total units, we get a suggestion to get results by product, by date or by Geo.
让我们开始以自然语言与我们的数据进行交互。 当我们开始在文本框中键入内容时,它也会内嵌建议。 在下面的示例中,您可以看到输入总单位后,我们会建议您按产品,日期或地理位置来获取结果。
Let us enter in Q&A box ‘Total Units by product’ and we get the desired data output as shown here.
让我们在“问与答”框中输入“问答总数”,我们将获得所需的数据输出,如下所示。
Now, change the question to represent this data into visualization form. In below screenshot, we want to represent data in Donut form. Once we type Donut, it identifies it and displays the visualization suggestions. However, it might not generate the visualization properly due to the data set.
现在,更改问题以将该数据表示为可视化形式。 在下面的屏幕截图中,我们想以Donut形式表示数据。 键入Donut后,它将对其进行识别并显示可视化建议。 但是,由于数据集的原因,它可能无法正确生成可视化效果。
Now, we will again ask the question to Power BI data set.
现在,我们将再次向Power BI数据集提问。
Question: total units by manufacturer and category in a treemap chart
问题:树状图中按制造商和类别划分的总单位
Question: show unit by year and the category, product
问题:按年份和类别,产品显示单位
In the examples above, we saw that Q&A functionality gives an automated suggestion as per the column and the tables defined. Power BI Desktop Q& A is very smart language processing system.
在上面的示例中,我们看到Q&A功能根据定义的列和表格给出了自动建议。 Power BI Desktop问答是一种非常智能的语言处理系统。
If you enter the text or question that Power BI does not understand, it gives the message accordingly. For example, just for testing purpose, I put my name into the Q&A box. It gives the error message ‘I didn’t understand that. Try using field names and values from your model or rephrasing your question’.
如果输入Power BI无法理解的文本或问题,则会相应地显示该消息。 例如,仅出于测试目的,我将我的名字放入“问答”框中。 它给出了错误消息“我听不懂。 尝试使用模型中的字段名称和值,或改写您的问题”。
You can ask any question from the data set. Let me ask a question again to get the data of ‘show products sorted by the manufacturer’.
您可以从数据集中提出任何问题。 让我再次问一个问题,以获取“按制造商分类的显示产品”的数据。
Until now, Q&A in Power BI Desktop allows interacting with the data with natural language and we do not have to do customization in order to get our results in multiple format or visuals.
到目前为止,Power BI Desktop中的Q&A允许使用自然语言与数据进行交互,并且我们不必进行自定义即可获得多种格式或视觉效果的结果。
As stated earlier, we use natural language to interact with the data in Power BI. When we ask any questions in Q&A, Power BI looks out for the keywords and makes assumptions about the data model. We should prepare our data set so that it can use this Q&A functionality. We should take a few considerations while preparing the data set.
如前所述,我们使用自然语言与Power BI中的数据进行交互。 当我们在问答环节中提出任何问题时,Power BI会寻找关键字并进行数据模型假设。 我们应该准备我们的数据集,以便它可以使用此Q&A功能。 在准备数据集时,我们应该考虑一些注意事项。
We should have the relationship between tables like below to get an answer to questions like Show products order by manufacturer.
我们应该在下表之间建立关系,以回答诸如“按制造商显示产品订单”之类的问题。
例如,一列可能包含有关地址,国家/地区,地点,纬度,经度,地点,邮政编码等信息。
Q&A will use the data classification information to visualize the data.
Q&A将使用数据分类信息来可视化数据。
This table format should be like below. In this table, each column represents similar kind of data.
该表格格式应如下所示。 在此表中,每一列代表相似的数据。
Q&A functionality in Power BI Desktop enables users to ask the question from the data set and easily get the results without any configuration or write complex codes. We can create visuals as well just by asking the questions. It gives the suggestions as well once we start typing the questions in Q&A box. I really found it a very useful tool to use natural language interaction with the data. You can explore this feature in your environment.
Power BI Desktop中的问答功能使用户可以从数据集中提出问题,并轻松获得结果,而无需进行任何配置或编写复杂的代码。 我们也可以通过提出问题来创建视觉效果。 一旦我们开始在“问答”框中键入问题,它也会提供建议。 我真的发现它是将自然语言与数据进行交互的非常有用的工具。 您可以在您的环境中探索此功能。
Ask a Question feature in Power BI Desktop |
Power BI Desktop中的“提问”功能 |
翻译自:
转载地址:http://itnwd.baihongyu.com/