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

Don't miss out! 2025 Microsoft Fabric Community Conference, March 31 - April 2, Las Vegas, Nevada. Use code MSCUST for a $150 discount. Prices go up February 11th. Register now.

Reply
ShahidYumeen
Helper I
Helper I

PowerBI report doesn't fit in the iframe set to 100% by 100%

Hi,
I have created a report having length and width as 1400 and 2400 px. i embedd this report in a website. The height and width of the iframe is set to 100% by 100%. but the dashboard isnt fitting well. There is some white space under the dashboard. i want it to perfectly filt without any space. Can anyone explain how could i do that?

 

Thanks

1 ACCEPTED SOLUTION

Hi @ShahidYumeen 

 

Manually setting the size of the iframe to match the report's dimensions could be a solution, please try this:

<iframe src="your_report_url" frameborder="0" style="width: 2400px; height: 1400px;"></iframe>

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

3 REPLIES 3
rajendraongole1
Super User
Super User

Hi @ShahidYumeen - To make a Power BI report fit perfectly in an iframe without white space, you can adjust both the iframe styling and the report settings. 

Go to your Power BI Desktop file, and in the "View" tab, enable the Responsive layout for your visuals if it’s not already enabled. This ensures that the visuals adapt to different screen sizes.

 

Set your report page size to "Fit to Page" under the Canvas settings in Power BI Desktop. This setting automatically resizes the content to fit within the iframe dimensions.

Ensure the iframe itself is styled in CSS to fill the parent container

<iframe
src="YOUR_POWER_BI_EMBED_URL"
style="width: 100%; height: 100%; border: none; overflow: hidden;"
allowfullscreen="true">
</iframe>

 

In Power BI Service, when you generate the embed code, check that your settings allow for the "Fit to page" or "Actual size" under View options for embedding. This can sometimes affect how the report adjusts within the iframe.

 

Hope this helps.





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!





Hi,
Thanks for the response.
My report settings -> page view is set to "fit to page". ANd the iframe is also styled same as given. Still there is some white space under the report. I have a question what if we manually set the size of the report like instead of 100% by 100%, i set it to 1400px by 2400 px?

 

Hi @ShahidYumeen 

 

Manually setting the size of the iframe to match the report's dimensions could be a solution, please try this:

<iframe src="your_report_url" frameborder="0" style="width: 2400px; height: 1400px;"></iframe>

 

Best Regards

Zhengdong Xu
If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Helpful resources

Announcements
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount! Prices go up Feb. 11th.

Jan25PBI_Carousel

Power BI Monthly Update - January 2025

Check out the January 2025 Power BI update to learn about new features in Reporting, Modeling, and Data Connectivity.

Jan NL Carousel

Fabric Community Update - January 2025

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