Deploying Power BI Reports to SharePoint Online
By: Rahul Mehta | Updated: 2018-02-26 | Comments (1) | Related: > Sharepoint
SharePoint Online stores information in a repository known as a SharePoint List which are like SQL Server tables. It has the capacity to store millions of records. The challenge is how to use the information to create interactive and visual comparisons within SharePoint Online.
With the evolution of Power BI, Microsoft provides Power BI as a business analytics service. Microsoft also provides integration of Power BI with SharePoint Online. Power BI allows developers to use SharePoint Lists as a data source and generate interactive reports and publish them on Power BI online. It can then further be embedded into SharePoint Online. In this tip, we will demonstrate step by step on how to perform this process.
The first step is to create a data source in SharePoint Online. I have already created a sample data source (from “Financial Sample.xlsx”) of an organization’s finance as a SharePoint List named as “FinanceList”:
The next step will be to create a report in Power BI. To do so, I would suggest downloading Power BI Desktop. Though much of the functionality could be achieved via Power BI online, I would recommend downloading the desktop version. It can be downloaded from here . Once downloaded, open Power BI desktop and a similar screen as shown below should appear:
Now that we are in Power BI, let's create our data source before we can use it to generate charts. Before we continue, I would suggest to login into Power BI desktop by clicking on the "Sign in" available at the top right corner of the tool. You can use the Power BI account to which you have given access or you have subscribed to.
We need to select a SharePoint List as a data source which is available as a part of Online Services. To do so, click on the Home Tab > Get Data > More > Online Services and a similar screen as shown below should appear:
As we can see, there will be various options of data sources to connect to. As we are currently targeting SharePoint Online, select "SharePoint Online List" and click "Connect". A screen shall appear to complete the SharePoint site information. Complete the site name in the box and click "OK".
Once the site is identified, a wizard will ask for a data source (in this case a list of all available SharePoint Lists) to be selected. Select the appropriate SharePoint List (in this case “FinanceList”) and click "Load". Also, a preview of the selected list will be shown on the right side of the screen.
When the data is successfully pulled, we will be able to see the data/model in Power BI. To see this, click on the "Data" icon on the left panel as shown in the below screen. We will be able to see the data.
Now let's start creating a basic report from the data we pulled. Click on the "Report" icon above the "Data" icon on the left panel. There will be a panel on the right side of the screen named "VISUALIZATIONS". For this tip, we will select a "Clustered column chart".
A blank chart should appear on the left side of the screen and a few fields will appear in the "VISUALIZATIONS" tab. For this tip, we will concentrate on three fields:
- Axis: This is for information on the horizontal/vertical axis. This will be the field for which all the values will be shown.
- Legend: Used to help readers understand the charted data.
- Values: Will hold the original figure which will be shown against each axis unit.
In this case, we are trying to compare units sold by each company for two years. Thus, the Axis will be "Country", Legend will be "Year" and Value will be "Units Sold". We must drag the columns from the "Fields" to the "VISUALIZATIONS" panel. Once configured, it should look like the below screen.
Now we need to host this report on SharePoint Online. Before we move ahead if not already saved, save the file. It will be saved with a name like "Filename.pbix". Once saved we need to publish this file to Power BI Online. To do so, go to Home tab and select "Publish".
A wizard will start and it will ask for a destination in Power BI to publish the report file. In my case, I will select the default workspace created by Power BI.
Once successfully created, it will show a confirmation message with the report link in Power BI Online.
Next, we must use this report in SharePoint Online. To do so, let's first copy the report link which we will use later in a Power BI web part. Go to browser address bar and copy the link excluding the last section of “/ReportSection". The reason for excluding the ReportSection is to allow the report on other pages aside from the Power BI report section page.
Once copied, go to the SharePoint Online site landing page, click on "Settings > Add a page". This is a modern view page which is supported across all devices and is responsive according to the device. Enter the page name and click on "Create".
Once a page is created, simply give a name to your page. Below that section, a "+" sign to add a web part will be available. Click on the + sign, scroll down and select "Power BI".
Once the web part is loaded, we must configure to show the report from Power BI Online. To do so, click on "Add Report". Once clicked, a configuration window will appear on the right of the screen.
Paste the URL in the "Power BI report link" which we copied in Step 12. If correctly copied, automatically the below properties including "Page name" and "Display" will be auto populated and selected.
Click on "Save and close" on the page and you will be able to see the report hosted in Power BI Online in SharePoint Online.
In this way, we can use Power BI to enrich SharePoint by creating interactive and deep analysis reports.
- Integrate SharePoint Online documents like Excel as a data source in Power BI reports.
- Check out these other Power BI tips.
Last Updated: 2018-02-26
About the author
View all my tips