How to view a full width Power BI report in SharePoint

hero
Contents

    Integrating Power BI and SharePoint is easy: Microsoft provides an out-of-the-box web part for SharePoint, and you just need to pull the report URL from Power BI.

    While the process is simple, the report may be too small due to SharePoint’s maximum page width. In this article, you will find two different methods to embed a full-width Power BI report in your SharePoint pages.

    Create a full-width Power BI report with a single part app page

    You can set up only one web part on single-part pages. You must use this method if you only want to display the report on the page and want to use all available space.

    This process requires the use of PnP PowerShell. If you don’t have it installed yet, you can download it here and don’t worry I’ll provide all the necessary code.

    To use this method, do the following:

    1.Open your Power BI report

    2.Click Share -> Embed Report -> SharePoint Online

    Embed Report SharePoint online
    How to view a full width Power BI report in SharePoint 13

    3.Copy the embed link

    4.Open your SharePoint site and create a new page to add your report

    5.Adding the Power BI web part

    6.Paste the link and configure the settings in the web part properties panel

    PowerBI on SharePoint
    How to view a full width Power BI report in SharePoint 14

    7.Save the page and publish it

    8.Download the PowerShell script from here, open your PowerShell console and run it. Running the script is self-explanatory and it allows you to switch between the 3 page layouts in case you want to revert your page to the original page layout.

    9.Enter the URL for the site collection and the name of the page.

    10.Choose Page Layout 3 – Single Web Part Application Page, after a few seconds you will see a success message in the console.

    psh
    How to view a full width Power BI report in SharePoint 15

    11.Refresh your page and you will get a full width report on SharePoint

    Fullwidth Single power bi report
    How to view a full width Power BI report in SharePoint 16

    Create a full-width Power BI report using a script editor

    If you want to combine your report with other web parts on the page, you must use the Script Editor web part available in the PnP repository.

    Modern SharePoint pages allow you to create a full-width section at the top of your pages. Unfortunately, there are only a limited number of web parts that can be used in this area, and Power BI is not one of them.

    However, the custom script editor can be used in full width and can be used to display your report along with other web parts.

    Before you actually start implementing this method, you must first install the Script Editor web part on your tenant by doing the following:

    1.Download the installation file from here. If you want to compile the project yourself, you can find the source code here

    2.Open your app catalog and upload the sppkg file

    3.Be sure to select Make this solution available to all locations in the organization.

    install
    How to view a full width Power BI report in SharePoint 17

    4.Click Deploy

    Now that you have your web part ready, it’s time to create your SharePoint page by doing the following:

    1.Open your Power BI report

    2.Click Share -> Embed Report -> Website or Portal

    Embed Report Website
    How to view a full width Power BI report in SharePoint 18

    3.Copy the iframe code as shown in the following image

    Iframe code
    How to view a full width Power BI report in SharePoint 19

    4.Edit your SharePoint page

    5.Create a full width section

    Full width section
    How to view a full width Power BI report in SharePoint 20

    6.Add the Script Editor web part to the full width section

    Add modern Script editor
    How to view a full width Power BI report in SharePoint 21

    7.Click Edit Markup

    8.In the properties window, click the Edit HTML code text box

    9.In the “Edit HTML code” area, paste the HTML code for the iframe

    10.Change the Width to 100% and adjust the Height to your needs.

    Paste iframe code
    How to view a full width Power BI report in SharePoint 22

    11.Click Save and continue creating your page.

    Full width section with report and webparts
    How to view a full width Power BI report in SharePoint 23

    visit article

    Dieser Beitrag ist auch verfügbar auf: Deutsch (German)

    Updated on 27. March 2024
    Was this article helpful?

    Leave a Reply

    Your email address will not be published. Required fields are marked *