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

To celebrate FabCon Vienna, we are offering 50% off select exams. Ends October 3rd. Request your discount now.

Reply
KKK
Frequent Visitor

Dashboard embedded code not fitting in power bi tile of canvas app

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 

 

 

 

 

1 ACCEPTED SOLUTION
v-luwang-msft
Community Support
Community Support

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).

vluwangmsft_0-1659323164013.png

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

 

View solution in original post

1 REPLY 1
v-luwang-msft
Community Support
Community Support

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).

vluwangmsft_0-1659323164013.png

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

 

Helpful resources

Announcements
September Power BI Update Carousel

Power BI Monthly Update - September 2025

Check out the September 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

Find out what's new and trending in the Fabric community.

Top Solution Authors
Top Kudoed Authors