Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Next up in the FabCon + SQLCon recap series: The roadmap for Microsoft SQL and Maximizing Developer experiences in Fabric. All sessions are available on-demand after the live show. Register now

Reply
Kavita
Frequent Visitor

power bi embedded

Scenario: Need to embed single visual through Power BI Embedded. Since embedding of the tile is not available created report where one page holds one visual and embedding the report to the web page.

 

We are successful in embedding the report through Power BI embedded, however we are facing issues related to fitment of the report in the iframe. The embedded report does not inherit the width and height of the iframe, instead it is rendering at differnt height and width which is distorting the look of the graph. Also it is not reponsive to different resolution and devices. Any pointers to overcome this will be very helpful. Thanks

1 REPLY 1
Eric_Zhang
Microsoft Employee
Microsoft Employee


@Kavita wrote:

Scenario: Need to embed single visual through Power BI Embedded. Since embedding of the tile is not available created report where one page holds one visual and embedding the report to the web page.

 

We are successful in embedding the report through Power BI embedded, however we are facing issues related to fitment of the report in the iframe. The embedded report does not inherit the width and height of the iframe, instead it is rendering at differnt height and width which is distorting the look of the graph. Also it is not reponsive to different resolution and devices. Any pointers to overcome this will be very helpful. Thanks


How did you emebed the report? I don't have the problem when embeding.

 

Capture.PNG

<html>

 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/bower_components/jquery/dist/jquery.js"></script>  
 <script src="https://microsoft.github.io/PowerBI-JavaScript/demo/bower_components/powerbi-client/dist/powerbi.js"></script> 
     

<script type="text/javascript">
window.onload = function () {
 
var embedConfiguration = {
    type: 'report',
    accessToken: 'eyJ0eXAxxxxxxxxxxxxxxxxxxxxxxxxxxxxmtzcGFjZUNvbGxlY3Rpb240UEJJIiwid2lkIjoiYjVkMDJiYmItODcxNy00MmJlLWEzMTMtZDEyYTdmYzk0OTcyIiwicmlkIjoiNzk4M2RiYjktOThjYy00ZjRjLTk4NmMtOGM3ODFjZmFkZjI2IiwiaXNzIjoiUG93ZXJCSVNESyIsImF1ZCI6Imh0dHBzOi8vYW5hbHlzaXMud2luZG93cy5uZXQvcG93ZXJiaS9hcGkiLCJleHAiOjE0ODQ4MDkzMzYsIm5iZiI6MTQ4NDgwNTczNn0.mbQSPB6Wn8lYpCk-GoEq_KWsTTlx_dXg9CO8EgNTX60',
    id: '7983dbb9-xxxxxxxxx-8c781cfadf26',
    embedUrl: 'https://embedded.powerbi.com/appTokenReportEmbed?reportId=7983dbb9-xxxxxxxxxc-8c781cfadf26'
}; 

var $reportContainer = $('#reportContainer');
 
var report = powerbi.embed($reportContainer.get(0), embedConfiguration);

report.fullscreen();  

}
</script>

<div style="height:400px; width:600px" id="reportContainer"></div>
</html>

Regarding responsive to different devices, based on my personal understanding, the embedded reports are supposed to be viewed by mainsteam browers in PC, for mobile devices, you can use Power BI Mobile.

Helpful resources

Announcements
New to Fabric survey Carousel

New to Fabric Survey

If you have recently started exploring Fabric, we'd love to hear how it's going. Your feedback can help with product improvements.

Power BI DataViz World Championships carousel

Power BI DataViz World Championships - June 2026

A new Power BI DataViz World Championship is coming this June! Don't miss out on submitting your entry.

Join our Fabric User Panel

Join our Fabric User Panel

Share feedback directly with Fabric product managers, participate in targeted research studies and influence the Fabric roadmap.

March Power BI Update Carousel

Power BI Community Update - March 2026

Check out the March 2026 Power BI update to learn about new features.