在SharePoint 平台上发布一个Power BI 报表

Posted xdanny

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了在SharePoint 平台上发布一个Power BI 报表相关的知识,希望对你有一定的参考价值。

使用SharePoint 列表数据创建一个桌面版的Power BI 报表

1. Let‘s use the same data Finance Sample Workbook from Power BI 技术图片 site for this example as well
2. Load the data in SharePoint List
3. Open the Power BI for desktop tool and sign in using your O365 ID & password
4. Click File -> New -> It should open the blank report
5. Click Get Data option from Home menu -> More -> Online Services -> SharePoint Online List as shown below:

技术图片

6. Enter the SharePoint URL - just the site collection but not till the List URL
7. Once you enter, select Microsoft account option from Anonymous, Windows, Microsoft account options displayed for authentication as shown below:

技术图片

8. Once authenticated & connected, it will display all lists and library in the site collection. Select the List (Finance Sample excel work book loaded) and either click edit to edit the columns or click Load to load the data to the Power BI
9. An important point to note is that the Finance Sample Excel Workbook is loaded into SharePoint List and now the data is connected to Power BI. If you notice the loaded data (columns Gross Sales, Sales Price, COGS, Profit related to cost) in Power BI are loaded as text instead of $$$ value in this example
10. Using Power BI, we can change the data type (NOTE: changing the data type will affect the data refresh so it is a good practice to change the data type in the source or load the data at the source with an appropriate data type). For this example, data type has been changed in the Power BI for the desktop. 
Option is Data section -> Modeling tab in Ribbon -> Data Type & Format as shown below:

技术图片

11. Loaded data and updated with data type is shown below:
技术图片

12. In the above data loaded columns month, year are in a separate column, let‘s use DAX expression to combine them and display as Year - Month in a separate column. A new column "Date" is added as shown below:
技术图片

13. Once the data is loaded, fields section shows the column that can be added to report, also the fields which can be displayed as aggregate/sum and also the measure created (Date field in above step):
技术图片

14. Now, it‘s time to add the charts in the report section. Used Card, KPI, Line & Clustered Column Chart, Pie Chart, Line Chart to complete the report which is shown below:

技术图片



Publish the report to SharePoint Online (Power BI Pro)

15. Now, it‘s time to publish the report to SharePoint Online. First step is to publish the report to work space in Power BI site then to SP Online.
技术图片
Log in to the Power BI site. In the above step, above report has been published to "My Workspace" section. Hence navigate to the My Workspace section in Power BI site -> Reports section (since this is published as report but not dashboard) -> click on the report ("Sales Report")

技术图片

Now, click on the File -> click on select Embed in SharePoint Online preview as shown below. This will give the link to publish the Power BI report to SharePoint Online.

技术图片

16. Now, time to integrate the report in SharePoint Online. In the previous article, have explained about creating Communication Sites in SharePoint Online. Now, create a page and then add Power BI (preview) web part as shown below:

技术图片

17. Now, name the page and publish the page. Below is the preview of the page and how the filter works in the chart according to the selection:

技术图片
Note: Embed in SharePoint Online is only available with Power BI Pro. Each user that views the report mush have a Power BI Pro license. If they do not have a Pro license, they will be prompted to sign-up to view the report

18. Next one final step is "Data Refresh". Navigate to the Power BI site again -> Work spaces -> My work space -> Data sets -> select your report (Sales Report) -> Schedule Refresh button in Actions section to schedule the data refresh as shown below:

技术图片


 

ios Power BI App preview of the report


技术图片

技术图片

Granting Access to reports

Embedding a report in SharePoint Online does not automatically give users permission to view the report in SharePoint site. The permissions to view the report are set within Power BI service itself. 
1. There are two ways to provide access to the report within the Power BI service. If you are using Office 365 Group to build your SharePoint Online team site, you list the user as a member of the app work space within the Power BI service. This will make sure that users can view the contents of that group. For more information , seeCreate and distribute an app in Power BI. 技术图片
2. Alternatively, you can grant users access to your report by doing the following.
        a.  Add a tile from the report to a dashboard.
        b. Share the dashboard with the users that need access to the report. For more information, see Share a dashboard with colleagues and others 技术图片.
Reference: https://powerbi.microsoft.com/en-us/documentation/powerbi-service-embed-report-spo/ 技术图片

Publish the report to SharePoint (without Power BI Pro option)

Suppose you don‘t have Power BI pro license but want to integrate the Power BI report in SharePoint 2013 or 2016 or in SharePoint Online, then Page Viewer is the option we have :)
Navigate to the page where you want to display the Power BI report -> add a Page Viewer Web Part -> add the link copied from Power BI site (Report -> File -> Embed in SharePoint Online(Preview)-> copy the link)

技术图片
技术图片
技术图片

 

Differences between publishing using Power BI pro & in Page Viewer web part

1. Show/Hide Navigation Page, Filter Pane options are available only in Power BI

技术图片

2. Options to change the display size of the report is available only in Power BI pro  

技术图片

3. Sorting the each section of report by it‘s main report parameter is available only in Power BI pro

技术图片
技术图片

4. Option to See Data of a particular report is available only in Power BI pro

技术图片


5. All the above options are not available in normal publishing way
6. Share the report via Facebook, Twitter, Linked In, Email, & information about report, flagging report option is available in normal publihing method (Page Viewe web part)

技术图片

 

Export to PowerPoint (Preview)

There is another option available in reports in Power BI site which is Export to PowerPoint(Preview). Navigate to Power BI Site -> Select the report -> File -> Export to PowerPoint (Preview) as shown below:

技术图片

The exported file is attached here to know how a exported Power BI report looks like. See Downloads section for the file.

Downloads


Conclusion

So, we have learned how to create a Power BI report from SharePoint List as data source, created DAX expressions, added different chart types, published the report to Power BI and then to SharePoint Online, SharePoint Online with out Power BI Pro and also applicable to SharePoint 2013 & 2016. 
 
 

以上是关于在SharePoint 平台上发布一个Power BI 报表的主要内容,如果未能解决你的问题,请参考以下文章

SharePoint 列表数据的 Excel Power Query 导入更改日期/时间值

Power Apps 中显示 SharePoint Online 数据

使用 Power Automate 检查 Office 365 组中是不是存在 Teams/SharePoint 用户

使用 Power Automate 将用户添加到 SharePoint 组

Power Apps 中显示 SharePoint Online 数据

如何使用power automate将excel中的数据导入SharePoint list?