azure创建centos_使用Azure Power BI创建Azure数据仓库报告
azure创建centos
介绍 (Introduction)
Power BI is an extremely powerful tool to create dashboards and reports. In the last article, we learned how to create a Data Warehouse in Azure. In this new chapter, we will learn how to create reports from the Data Warehouse in Azure using Power BI in Azure.
Power BI是创建仪表板和报告的功能非常强大的工具。 在上一篇文章中,我们学习了如何在Azure中创建数据仓库 。 在这一新的章节中,我们将学习如何使用Azure中的Power BI从Azure的数据仓库中创建报表。
With Power BI, you have your information in real time, it is easy to learn and use. In Azure, you do not need to install anything!
借助Power BI,您可以实时获取信息,易于学习和使用。 在Azure中,您无需安装任何内容!
In this article, I will show you how to create charts, work with maps and show some limitations of the tool.
在本文中,我将向您展示如何创建图表,如何使用地图以及如何使用该工具。
要求 (Requirements)
- An Azure Account. Azure帐户。
- The Azure Data Warehouse installed. 已安装Azure数据仓库 。
入门 (Getting started)
-
Open the Azure Portal and go to the SQL Database:
Figure 1. SQL databases 打开Azure门户并转到SQL数据库:
图1. SQL数据库 -
Select your SQL Data Warehouse created in earlier chapters and press “Open” in Power BI icon:
Figure 2. The Data warehouse in the Portal 选择您在前面的章节中创建SQL数据仓库,然后在Power BI图标中按“打开”:
图2.门户中的数据仓库 -
If it is your first time using Power BI, you may need to specify your credentials. Otherwise, login with your credential:
Figure 3. The login window. 如果是第一次使用Power BI,则可能需要指定凭据。 否则,使用您的凭证登录:
图3.登录窗口。 -
The system will show the Server name and the Database name. You can optionally enable the advanced option to specify the frequency to refresh the data (by default 15, which is the minimum value). Just press “Next”, unless you want to change the advanced options:
Figure 4. The Data Warehouse Connection information 系统将显示服务器名称和数据库名称。 您可以选择启用高级选项以指定刷新数据的频率(默认为15,这是最小值)。 只需按“下一步”,除非您想更改高级选项:
图4.数据仓库连接信息 -
You will need to specify the username and password to connect to the Database:
Figure 5. The username and password 您将需要指定用户名和密码才能连接到数据库:
图5.用户名和密码 -
You will have the following image created. Double click on it:
Figure 6. The Power BI 您将创建以下图像。 双击它:
图6. Power BI -
You are now in Power BI! You can create the report now.
Figure 7. The Power BI Window 您现在在Power BI中! 您可以立即创建报告。
图7. Power BI窗口 -
Check the “FactInternetSales” in the “Fields” section:
Figure 8. The Fields 检查“字段”部分中的“ FactInternetSales”:
图8.字段 -
Select the “SalesAmount” field:
Figure 9. Selecting the field for the chart 选择“ SalesAmount”字段:
图9.选择图表的字段 -
In the legend, select the “Currency key”:
Figure 10. Selecting the Legend for the chart 在图例中,选择“货币**”:
图10.选择图表的图例 -
The graph created is the following:
Figure 11. The chart created 创建的图形如下:
图11.创建的图表 -
You can easily change the bars to pies using the visualization option:
Figure 12. The pie chart in Power BI 您可以使用可视化选项轻松将条形更改为饼形:
图12. Power BI中的饼图 -
You can add text boxes to your chart and add text by customizing the font, size, alignment:
Figure 13. Adding the text box 您可以在图表中添加文本框,并通过自定义字体,大小,对齐方式来添加文本:
图13.添加文本框 -
You have a button to analyze your information in Excel. This option is in the preview version. For this option, you will need to install the SQL_AS_OLEDB installer, which will be downloaded from the Azure Portal. The installer is a new version of the connector included in SQL 2016:
Figure 14. Analyzing the report in Excel 您有一个按钮可以在Excel中分析您的信息。 此选项在预览版本中。 对于此选项,您将需要安装SQL_AS_OLEDB安装程序,该安装程序将从Azure门户下载。 安装程序是SQL 2016中包含的连接器的新版本:
图14.在Excel中分析报告 -
This new provider allows connecting to Power BI from Microsoft Excel. When you try to access, you will the the odc file. This file contains the connection information. The installer has 28 MB approx:
Figure 15. The SQL_AS_OLEDB Provider 此新提供程序允许从Microsoft Excel连接到Power BI。 尝试访问时,将显示odc文件。 该文件包含连接信息。 安装程序大约有28 MB:
图15. SQL_AS_OLEDB提供程序 -
To open the connection in Excel, in the menu go to “DATA”. Select the “Get External Data” and select “Existing Connections”. Then you will select the odc file:
Figure 16. Connecting to Excel 要在Excel中打开连接,请在菜单中转到“数据”。 选择“获取外部数据”,然后选择“现有连接”。 然后,您将选择odc文件:
图16.连接到Excel -
Your Power BI credentials will be required. You will be connected to Excel. You will be able to handle the Azure Data in Excel like any dynamic table:
Figure 17. Using Excel to connect to Power BI 您的Power BI凭据将是必需的。 您将连接到Excel。 您将能够像处理任何动态表一样在Excel中处理Azure数据:
图17.使用Excel连接到Power BI -
In Power BI, you can also add Shapes to your charts, like rectangles, ovals, lines and arrows:
Figure 18. The Power BI Shapes 在Power BI中,您还可以将图形添加到图表中,例如矩形,椭圆形,直线和箭头:
图18. Power BI形状 -
The format shape allows you to change the color, transparency, rotation, background, titles and other shape properties:
Figure 19. The shape’s properties 格式形状允许您更改颜色,透明度,旋转度,背景,标题和其他形状属性:
图19.形状的属性 -
You can “Save” or “Save As” your report and create similar reports with some modifications:
Figure 20. The File menu. 您可以“保存”或“另存为”报告,并进行一些修改后创建类似的报告:
图20. File菜单。 -
In the menu, you can find the dashboards, reports, and datasets:
Figure 21. The Power BI menu. 在菜单中,您可以找到仪表板,报告和数据集:
图21. Power BI菜单。 -
When you click the “Save as” button, the report will be created in the report section:
Figure 22. The reports 当您单击“另存为”按钮时,将在报告部分中创建报告:
图22.报告 -
By default, when you select a report, it is in a read-only mode. You’ll need to press the “Edit report” option to edit the report:
Figure 23. Editing a report 默认情况下,当您选择报告时,它处于只读模式。 您需要按“编辑报告”选项来编辑报告:
图23.编辑报告 -
Another cool feature is the Map. In the “Fields” section, go to the “DimGeography” dimension and select the “City” field:
Figure 24. The DimGeography dimension 另一个很酷的功能是地图。 在“字段”部分中,转到“ DimGeography”维度,然后选择“城市”字段:
图24. DimGeography维度 -
A map is displayed and it shows all the cities from the dimension:
Figure 25. The Power BI maps 将显示一个地图,并显示该维度中的所有城市:
图25. Power BI映射 -
Using the mouse wheel, you can Zoom in and Zoom out the map. You can see the names of the streets:
Figure 26. The street names in Power BI 使用鼠标滚轮,可以放大和缩小地图。 您可以看到街道名称:
图26. Power BI中的街道名称 -
In the a new report, create a chart of the “FactInternetSales” table of the “SalesAmount” field (as we did in step 9):
Figure 27. The sales amount chart 在新的报告中,在“ SalesAmount”字段中的“ FactInternetSales”表中创建一个图表(与在步骤9中所做的一样):
图27.销售量图 -
Now, I am going to try to get the chart of sales amount per currency name. In the “DimCurrency” table, select the “CurrencyName” field.
Figure 28. The graph per Currency Name 现在,我将尝试获取每个货币名称的销售额图表。 在“ DimCurrency”表中,选择“ CurrencyName”字段。
图28.每个货币名称的图形 -
If you check the graph of the “SalesAmount” per currency name, you will notice that all the values are the same for each currency. This is because Power BI cannot detect the relationships between the Fact Table and the dimensions. This is not cool, but you can create views to get this information.
如果检查每种货币名称的“ SalesAmount”图,您会注意到每种货币的所有值都相同。 这是因为Power BI无法检测事实表和维度之间的关系。 这不是很酷,但是您可以创建视图来获取此信息。
结论 (Conclusion)
Power BI is a simple an intuitive tool. In Azure, you do not need to worry about the installation. You only need to take care of the information and create nice reports for your company. I hope you will have fun with it as I did.
Power BI是一个简单而直观的工具。 在Azure中,您无需担心安装。 您只需要照顾好信息并为您的公司创建漂亮的报告即可。 希望您能像我一样乐在其中。
In this article, we have learned how to create charts, add shapes, add text, and work with maps. We’ve also learned how to export the Power BI information to MS Excel. For Excel, you will need the last OLEDB provider. We’ve also noticed that Power BI cannot detect the relationships between the Fact and Dimension tables. The workaround is to create some views with the information required.
在本文中,我们学习了如何创建图表,添加形状,添加文本以及使用地图。 我们还学习了如何将Power BI信息导出到MS Excel。 对于Excel,您将需要最后的OLEDB提供程序。 我们还注意到Power BI无法检测Fact表和Dimension表之间的关系。 解决方法是使用所需的信息创建一些视图。
If you have any questions, please let me know – you may use the comments section below.
如有任何疑问,请告诉我-您可以使用下面的评论部分。
翻译自: https://www.sqlshack.com/create-azure-data-warehouse-reports-using-azure-power-bi/
azure创建centos