Integration with Power BI Reports

Loading

Integrating Power BI reports into Power Apps allows users to visualize data dynamically and interact with insights within their applications. Below is a detailed, step-by-step guide to embedding Power BI reports in Power Apps:


Step 1: Prerequisites

Before you begin, ensure you have the following:

  • Power BI Account (with a Power BI Pro or Premium Per User (PPU) license)
  • Power Apps Account (with the appropriate permissions)
  • Power BI Report Published to a Workspace (Premium capacity is required for sharing externally)
  • Power BI Service Principal Enabled (for API access, if needed)
  • Power Apps Environment Set Up (with the appropriate Dataverse/CDS access if required)

Step 2: Publish the Power BI Report

  1. Create a Report:
    • Open Power BI Desktop.
    • Connect to your data source (Excel, SQL, Dataverse, etc.).
    • Design the report with necessary visuals.
  2. Publish the Report:
    • Click FilePublishPower BI Service.
    • Choose an appropriate workspace (avoid “My Workspace” for shared apps).
    • Confirm the upload.
  3. Check Report in Power BI Service:
    • Go to Power BI Service.
    • Open the workspace → Reports → Click the report to ensure it works.

Step 3: Enable Embed Permissions in Power BI

  1. Open Power BI Service.
  2. Navigate to the Workspace where the report is published.
  3. Click on Settings (gear icon).
  4. Under Export and Sharing Settings, ensure:
    • “Allow users to share and embed” is enabled.
    • Ensure RLS (Row-Level Security) is properly configured if necessary.

Step 4: Get the Power BI Report Embed Link

  1. Open the Report in Power BI Service.
  2. Click on the File menu.
  3. Select Embed Report → Choose Website or Portal.
  4. Copy the Embed URL provided.

Step 5: Embed Power BI Report in Power Apps

There are two methods to integrate Power BI reports into Power Apps:

Method 1: Using Power BI Tile Control

  1. Open Power Apps Studio (https://make.powerapps.com).
  2. Create a new canvas app or open an existing one.
  3. Click InsertCharts → Select Power BI Tile.
  4. Choose the Power BI Workspace, Dashboard, and Tile.
  5. Save and run the app.

Method 2: Using an Embed URL with an IFrame

  1. Open Power Apps Studio.
  2. Create a new canvas app.
  3. Click InsertAdd HTML Text Control.
  4. Inside the HTML Text control, use this sample IFrame: <iframe width="800" height="600" src="YOUR_EMBED_URL_HERE" frameborder="0" allowFullScreen="true"></iframe>
  5. Replace "YOUR_EMBED_URL_HERE" with the embed link from Step 4.
  6. Adjust width and height as needed.
  7. Save and preview the app.

Step 6: Use Power BI Embedded API for Interactive Reports

If you need dynamic embedding with filters, follow these steps:

1. Register an Azure AD App for Authentication

  1. Go to Azure Portal.
  2. Navigate to Azure Active DirectoryApp Registrations.
  3. Click + New Registration.
  4. Enter a name (e.g., “PowerApps-PowerBI”).
  5. Set Redirect URI to:
    https://login.microsoftonline.com/common/oauth2/nativeclient
  6. Click Register.
  7. Copy the Application (client) ID.

2. Set API Permissions

  1. In the Azure AD App settings, go to API Permissions.
  2. Click Add a permission → Select Power BI Service.
  3. Choose:
    • Report.Read.All
    • Dataset.ReadWrite.All
  4. Click Grant Admin Consent.

3. Generate a Client Secret

  1. In Azure AD App, go to Certificates & secrets.
  2. Click + New client secret.
  3. Set an expiration date and copy the value (store it safely).

4. Use Power BI Embedded Component in Power Apps

  1. Go to Power Apps Studio.
  2. Insert a Power BI Embedded Control.
  3. Bind it to the report using the Azure AD authentication.

Step 7: Apply Power BI Filters in Power Apps

To dynamically filter the report in Power Apps:

  1. Add a Dropdown or Textbox in Power Apps.
  2. Modify the embed URL with a filter: https://app.powerbi.com/reportEmbed?reportId=REPORT_ID&filter=Table/Column eq 'Value'
  3. Use Power Apps variables like: Set(FilterValue, Dropdown1.Selected.Value)
  4. Update the Power BI IFrame URL dynamically.

Step 8: Share and Deploy the Integrated Power Apps

  1. Save and Publish the Power Apps.
  2. Share the App with required users.
  3. Ensure they have Power BI licenses to access embedded reports.

Step 9: Monitor and Troubleshoot

  • If reports do not load, check user permissions in Power BI.
  • If using Row-Level Security (RLS), ensure appropriate roles are assigned.
  • Use Power Apps Monitor to debug issues.

Final Thoughts

This guide provides a comprehensive step-by-step integration of Power BI with Power Apps. Depending on your use case, you can either use Power BI Tile control, an IFrame embed, or the Power BI API for a seamless experience.

Would you like help with Power Automate flows to automate Power BI and Power Apps actions?

Leave a Reply

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