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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
msalam
Frequent Visitor

PBIX file size problem

.My PBIX file size grew illogically and i'm not able to find out what is causing that size.

I even deleted all pages from the report and all datasets and relations... and the file still shows 4.2 MB on the filesystem.. which is causing me problems when trying to export it using the APIs.

 

here is the file 

www.rubics.net/emptyfile.pbix.zip

 

can you please advise on why the file is still holding that size?

1 ACCEPTED SOLUTION
Brian_M
Responsive Resident
Responsive Resident

Got it!

 

Open the Layout 'file' in Notepad++ and you will see large swathes of image information, which looks like the scatter.jpg and other image artifacts that were actually in your Static Resources folder are actually baked into the Layout 'file' as well.  

 

You should be able to avoid the issue if you start from scratch and are very selective about the images that you introduce. Alternatively, you may well be able to compare the Layout 'file' for a new blank pbix with the one you have, and scrape out the jpg and png junk that you don't want.

 

e.g

"scatter.jpg","name":"scatter.jpg","content":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAJACAIAAACc94OCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAP+lSURBVHhe7J0FfBy38sfXSdM2Tdo0VKb3+l77ysxNm1IaZmZmZuaGmZmhScPM0DAzg0NOYmam/29mtLq989k+U5r2f9+PrZNGo9FIq9VKe3t3RqIbNw+W+HgJCXlFyDkpEZ8YhzCBkQiL00LaS2Qc+BkXR55PmLTw1u178RDEUWO5Ha46hC6CcnhE1IQlWyoNmF6iy7jb93wgiUlQpkRNQ6YTlBxhbBwLULNkpx2UVbGUUAdR6lK4WtYpttaxrQT0Q2w8GhHv7x9I44a7xaEKjqGgciZZLE5JlEyxHTle9wJDnusw59xtP5gCoiBZB8...

View solution in original post

16 REPLIES 16
Anonymous
Not applicable

I've recently had the same problem and my file size also grwe about 4Mb, from 1.6Mb to 5.7Mb after some small changes. Even after deleting all pages, leaving only an empty one and deleting all tables, except the fact table, the file size was 5.7Mbytes. I could never get back to the originally 1.6Mb file size.

It seems to by a Power BI bug, and the size increase is very similar to yours, which makes me believe that it's not only a specific image that was inserted and left as "undeletable trash". 

v-ljerr-msft
Microsoft Employee
Microsoft Employee

Hi @msalam,

 

I downloaded the pbix file you shared with us, and also created a brand new pbix with Power BI Desktop myself. Then I extracted both files to Folders using Zip file tools. After comparing them within the folders, I found there is Layout file within "Report" folder which is mainly holding the size(about 4594 KB), and "CustomVisuals", "StaticResources" folders are also holding some of the size.

 

holdsize.PNG

 

Regards

Thanks for your answer.

 

So that Layout file, how can we get rid or reduce its size? why is it still there when the actual report page is empty?

Brian_M
Responsive Resident
Responsive Resident

You can save 1.7MB if you delete out the icons in under the Static Resources directory. You save a bit more by removing the custom visualisations that are there as well.

 

I see what you mean about the Layout, it's large compared to a new file.  I've tried deleting the page and adding a new one as I'm sure you have, to no effect.

 

It's interesting to look at the impact of various artifacts, can I ask why you need such a small file?

my problem started while i was still using the Beta version of Power BI Embedded, where i was hitting a timeout everytime i try to Import my pbix file to my web app, so i tried to figure out what is causing that time out and found that its related to the size of the file which didn't mean to me logical,,then i started removing items 1 by 1 from my reports to find out which item is that big size .. to find out that nothing there is causing that file size.. as you saw in my empty file.

 

Now because of my problem i discovered that there is a new release for Power BI embedded which allows to increase the timout period and you work around or solve that problem.

 

But i'm still curious to know how to reduce my PBIX file size so as when this file really grows it grows in a logical behavior.

Brian_M
Responsive Resident
Responsive Resident

Got it!

 

Open the Layout 'file' in Notepad++ and you will see large swathes of image information, which looks like the scatter.jpg and other image artifacts that were actually in your Static Resources folder are actually baked into the Layout 'file' as well.  

 

You should be able to avoid the issue if you start from scratch and are very selective about the images that you introduce. Alternatively, you may well be able to compare the Layout 'file' for a new blank pbix with the one you have, and scrape out the jpg and png junk that you don't want.

 

e.g

"scatter.jpg","name":"scatter.jpg","content":"data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAABAAAAAJACAIAAACc94OCAAAAAXNSR0IArs4c6QAAAARnQU1BAACxjwv8YQUAAAAJcEhZcwAACxIAAAsSAdLdfvwAAP+lSURBVHhe7J0FfBy38sfXSdM2Tdo0VKb3+l77ysxNm1IaZmZmZuaGmZmhScPM0DAzg0NOYmam/29mtLq989k+U5r2f9+PrZNGo9FIq9VKe3t3RqIbNw+W+HgJCXlFyDkpEZ8YhzCBkQiL00LaS2Qc+BkXR55PmLTw1u178RDEUWO5Ha46hC6CcnhE1IQlWyoNmF6iy7jb93wgiUlQpkRNQ6YTlBxhbBwLULNkpx2UVbGUUAdR6lK4WtYpttaxrQT0Q2w8GhHv7x9I44a7xaEKjqGgciZZLE5JlEyxHTle9wJDnusw59xtP5gCoiBZB8...

Anonymous
Not applicable

I have the same problem.......where do I find the layout file?

Thanks Brian, this seems to be a good and fast workaround. 

 

Do you think there should be a tool that should regenerate the layout file based on what the report has actually rather than keeps hold of all history?

Anonymous
Not applicable

I have the same problem. Where do I find the layout file?

Brian_M
Responsive Resident
Responsive Resident

The PBI Desktop tool should probably handle this more effectively itself, unless there's some gotcha's that aren't evident to you and I. I'll send some feedback through to the product team.

Indeed it should be the basic responsibility of Power BI Desktop.

 

Although we agree that your solution is a workaround, yet it would be a night mare to effectively open that file and try to eliminate all redundant data from it when that file is fully loaded with real usefull reports unlike our scenario an empty file.

Brian_M
Responsive Resident
Responsive Resident

Brian_M
Responsive Resident
Responsive Resident

A 'blank' Layout only has the following

 

{"id":0,"sections":[{"id":0,"name":"ReportSection","displayName":"Page 1","ordinal":0,"visualContainers":[],"displayOption":1,"width":1280,"height":720,"config":"{}"}],"config":"{\"version\":\"2.1\",\"activeSectionIndex\":0}"}

Brian_M
Responsive Resident
Responsive Resident

Hi,

 

I'm also getting the 404 error. If you can share the file again we can take a look.

Seth_C_Bauer
Community Champion
Community Champion

@msalam I get a 404 file not found when accessing the link. Have you tried changing the PBIX extension to .zip? This will allow you to open the file and see where the size is being applied. You can change it back to a .pbix afterwards.


Looking for more Power BI tips, tricks & tools? Check out PowerBI.tips the site I co-own with Mike Carlo. Also, if you are near SE WI? Join our PUG Milwaukee Brew City PUG

i fixed the file location adding .zip to it so you can download it

 

www.rubics.net/emptyfile.pbix.zip

Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 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