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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
Anonymous
Not applicable

File corrupted after compressing back to pbix

Hi there,

 

I have tried unzip the pbix file. Without any change, I compress it back to zip file and rename to .pbix. The file is corrupted when I open. Any idea why? Is there anything I need to configure specifically during compressing?
Note:
1) I use 7-zip. 
2) I noticed the file size after compressing is less than the original one. 

 

cheers

 

1 ACCEPTED SOLUTION

By do you need to unzip it?  Just rename it to a zip file and access what you want without unzipping it. Then rename it back



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

View solution in original post

9 REPLIES 9
Reza
Helper II
Helper II

I had the same problem. I used 7zip to update the layout as doing from the report is time consuming. 

What I had to do at the end was deleting the SecurityBindings with the 7zip itself. File opens without any error.

Reza_0-1677588209724.png

Another tip. If you need to change your connection then go ahead and delete the Connections file as well. When opening the report select the server and database and all working again.

lcesarini
Frequent Visitor

Hi, how did you solved?

I tried the following steps as test whithout success:

  1. copied pbix file test.pbix to temp folder
  2. renamed the file adding .zip extension: test.pbix.zip
  3. opened with 7zip
  4. selected the file named "Connections"
  5. edited with 7zip command File->Edit with default editor
  6. renamed the SSAS server instance name (since it has been changed)
  7. Saved back ( 7zip itself asked me if I wanted to update zip file)
  8. Exit from 7zip
  9. Renamed back to original pbix file.
  10. Opened with PowerBi, but a message says that the file is corrupted.

Yes, I know that it is possible to modify the connection parameter within PBI, and the new connection was working  

What I noticed is that - differently from the other files which has empy attributes -, for the modified file "Created", "Last Access", "Attribute" and "Characteristics" was filled with values (respectively: date:time, date:time, A, NTFS).

 

Now is there any protection mechanism or simply a propretary compression algorithm ?

jitendrapandey
Advocate II
Advocate II

I would ask what compression algorithm is used by PBIX files (rather than asking which Zip application is used to compress it) then search what Zip applications provide that compression algorithm.

 

I hightly suspect it might be Microsoft's properiety compression algorithm especially developed for BBIX files.

 

Having said that, it would be way-way useful to know how to compress the PBIX files back without corrupting them.

maceyak
Regular Visitor

The solution works.  Except that I would like to make a change to the Layout file.  When I make that change, no matter how small, and then put back the pbix suffix I get a corrupt file message when I try to open it in Power BI.  Why?  Is there any way around this?

Any idea how to edit layout file?

By do you need to unzip it?  Just rename it to a zip file and access what you want without unzipping it. Then rename it back



* Matt is an 8 times Microsoft MVP (Power BI) and author of the Power BI Book Supercharge Power BI.

EDIT: If you want to overwrite the same report in Power BI service, you'll need to retain the Report ID int he RemoteArtifacts section of the config. If you just copy the whole lot like I suggested below you will get a new report and new dataset created which probably isn't what you want.

 

can confirm that if you edit the archive directly in 7zip (i.e. don't unzip make changes and then recompress) it works. 

 

To get a known-good connection string make a dummy report connected to your new data source and copy the entire contents of the 'Connections' file. Wasn't enough for me to simple change the SSAS instance name

Hi, Matt

I tried this way but unfortunately it doesn't work (at least with "pea zip" and "7zip").

Any change at the end PowerBI says that the file is corrupted. Can you telle me please wich compressing application are you using?

The reason why it is necessary to access to unzipped source is that this way seems the only solution for aligning the report to a renamed dimension widely used inside report itself, connected to SSAS cube,.

As far as I know there are not tools inside BPI Desktop to make such operation on visuals, and sincerily I don't understand why such a basic development functionality has not been yet implemented. A change in dimension naming convention inside an Enterprise cannot be excluded and without any tool for a bulk renaming, it could become a nightmare.

 

Some functionality like the "Advanced Editor" (not available by the way on SSAS connections), but extended to whole report would be very useful.

Thank you

Hello, I have  a corrupted message even if we rename the file to .zip !

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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