Power BI

Have you tried


for Microsoft Power BI

It is simple to embed Power BI Reports, Visuals, Tiles or Dashboards into your web application since Power BI provides a simple-to-implement framework. This is specifically relevant to Independent Service Vendors (ISVs) who do not have to spend time and effort into coding visualizations when they can easily build stunning visualizations using Power BI.

When embedding reports using the Embedded API, we can restrict the functionalities on a more granular level, add more filters that are not available in the actual report, hide specific visuals, and even change the layout of the visuals in the report.

There are three methods to embed Power BI Reports.

1. Publish to Web.

The option “Publish to Web” is available under File Menu when we open the report in Power BI Service.

embed-power-bi-reports-dashboards-applications

 

An embed code is generated, which can be directly inserted into your application.

embed-power-bi-reports-dashboards-applications

 

The disadvantage of this approach is that we cannot enforce any security restrictions on the report, and the data is visible to everyone. Therefore, reports which use Live Connections, and Row Level Security cannot be embedded via this approach.

We can choose to delete existing embed codes through the Power BI Service (Settings -> Manage Embed Codes) if you no longer wish to share the report with the audience.

 

2. Embed Content for your Organization – UserOwnsData

Embedding Power BI content for your Organization means that User owns the data. The security settings (including row-level security) for the Power BI Reports is carried over and requires the individual application viewers to log in before viewing the embedded reports.

Step 1: Microsoft provides a simple sign up form that registers your application (that would be embedding the Power BI content) in Azure Portal.

https://app.powerbi.com/embedsetup/UserOwnsData

embed-power-bi-reports-dashboards-applications

embed-power-bi-reports-dashboards-applications

embed-power-bi-reports-dashboards-applications

 

After clicking on Register, the Application ID and Application Secret are returned.

As we already have the workspaces and the reports ready in Power BI, we can skip Step 3 and 4.

embed-power-bi-reports-dashboards-applications

embed-power-bi-reports-dashboards-applications

 

The Web Application is now registered on Azure, and we can embed Power BI content in it. Please save the Application ID and Application secret, because we would be using it in our application.

 

Step 2: Configure the Sample Application provided and embed a Power BI Report.

The sample Power BI Application can be downloaded using the Download Sample App button. It is also available at the link below.

https://github.com/Microsoft/PowerBI-Developer-Samples/tree/master/User%20Owns%20Data/integrate-report-web-app

embed-power-bi-reports-dashboards-applications

 

In the downloaded application, open the Cloud.config file, and update the Application ID and Application Secret fields.

embed-power-bi-reports-dashboards-applications

 

Update the Workspace ID and the Report ID fields with the values of the Power BI Report you wish to embed.

embed-power-bi-reports-dashboards-applications

 

Step 3: Running the Application

Clicking on the Get Report button embeds the Power BI Report into the web application.

embed-power-bi-reports-dashboards-applications

 

Step 4: Customizing the Web Application to add a Region Filter.

A button “Set Region Slicer” has been added to the web application.

embed-power-bi-reports-dashboards-applications

 

In the Region_Set_Click() function, we construct the filter on Region=”Germany”. We retrieve a reference to the Power BI report from the report container and apply the filter using setFilters().

embed-power-bi-reports-dashboards-applications

 

embed-power-bi-reports-dashboards-applications

 

We can see that the filter has been applied to the report.

Using this API, we can choose to Extend the Power BI context/options menu to add custom functions, change the report layout, hide certain visuals, log the tiles clicked in a dashboard etc.

 

3. Power BI Embedded for Customers – AppOwnsData

This enables Independent Service Vendors (ISVs) to embed Power BI content for users who do not have Power BI Licenses. A single Power BI Pro License is needed to act as the master account. Power BI Embedded Pricing would apply.

For more details on this implementation, please contact Visual BI here.

Subscribe to our Newsletter

5920 Windhaven Pkwy
Plano TX 75093.

+1 888-227-2794

+1 972-232-2233

+1 888-227-7192

solutions@visualbi.com