Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.
Hi Everyone,
I have created an embedded code for power bi dashboard ( example shown below).
https://app.powerbi.com/dashboardEmbed? dashboardId=xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
I use this code in the canvas app where I have added power bi tile to display this dashboard.
The dashboard is visible and working fine. The only challenge is that whole dashboard does not fit in the power bi tile. So we end up having horizontal and vertical scroll bars.
I wanted to know if there is any keyword that I can add in the embed code so that the dashboard fits in the power bi tile.
I look forward to receiving the response.
Thank you
Solved! Go to Solution.
Hi @KKK ,
Embedded Power BI dashboards won't auto fit the resolution to have a mobile friendly layout. As a workaround, in Javascript code, you can detect the screen resolution and then determine whether embedding in "fitToWidth" or "oneColumn".
var config = { type: 'dashboard', tokenType: models.TokenType.Embed, accessToken: accessToken, embedUrl: embedUrl, //pageView: "fitToWidth", pageView: "oneColumn", id: embedDashboardId };
OneColumn(left) VS fitToWidth(right).
To learn more details ,refer:
https://community.powerbi.com/t5/Developer/Power-BI-Embedded-responsive-dashboard-view/m-p/273815
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien
Hi @KKK ,
Embedded Power BI dashboards won't auto fit the resolution to have a mobile friendly layout. As a workaround, in Javascript code, you can detect the screen resolution and then determine whether embedding in "fitToWidth" or "oneColumn".
var config = { type: 'dashboard', tokenType: models.TokenType.Embed, accessToken: accessToken, embedUrl: embedUrl, //pageView: "fitToWidth", pageView: "oneColumn", id: embedDashboardId };
OneColumn(left) VS fitToWidth(right).
To learn more details ,refer:
https://community.powerbi.com/t5/Developer/Power-BI-Embedded-responsive-dashboard-view/m-p/273815
Did I answer your question? Mark my post as a solution!
Best Regards
Lucien