In this article, we will embed a Power BI report in a python web application. Following are the steps to embed a report.
- Go to Power BI web service and open the report that you want to embed in your web application, then click o the file menu and select the Embed option.
- The following window will pop up.
Now copy the highlighted URL and save it somewhere you will need that URL later. Also copy the iframe tag in your web application’s front end logic. You can also adjust the height and width of the iframe.
Now open the .py file where your routs are set. Now copy the highlighted URL and assigned it to one variable as shown below.
Now remove the URL of iframe and replace it with the variable in the following way. you have to enter your Power BI credentials.
- The final output will look like this.Hope this helps.