cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Frequent Visitor

File contains corrupted data Details: Binary

I created a PBIx using OneDrive - after a few hours, I started to receive the "File contains corrupted data Details: Binary" error. I managed to clear cache and delete CEF and that fixed it at first. Hours later, I received the same error. I spent HOURS trying to fix the error then was told that it might be OneDrive.

I then changed all my datasources to a Sharepoint site and this seemed to fix the issue (although, deleted all my measures which I had to recreate). Another 8 hours worth of work, I added a conditional column which caused some errors due to "nulls" that I wasn't aware of. I went back and deleted the column and was going to create a calculated column for those where the column was null. 

I have then received the "File contains corrupted data" error and when I went into the query editor, I am back with the same error as before.

Data is a 50mb xlsx file - I tried splitting it down into files smaller than 30mb, this has no affect. The data is stored in a table. I have tried clearing cache and CEF again - no joy. I have no data types that are binary. I have a column that is consistently a 1 but this is imported as a number. There are no custom visuals. I have tried clearing the global permissions and reconnecting. I am on the latest version.

 

I am so frustrated because I can't seem to find the issue and I don't want to start over and recreate 2 days worth of work, again, to receive the same error.

 

Please help!

10 REPLIES 10
New Member

I was having the same problem for 2 days, in my case my IP was in the DMZ of my router that I think was creating some conflict with OneDrive. I take it out of the DMZ and apparently solve the problem.

Community Support
Community Support

Hi,

 

Please try to re-create the pbix file and test again.

 

Best Regards,

Giotto

Super User III
Super User III

I cannot tell from your post if the PBIX is corrupt, or the XLSX. If it is XLSX, that is probably not the issue. I had a similar error this week and opening/saving/closing the Excel file fixed it. it was an intermittent issue.

 

But storing files on one drive, your c drive, or sharepoint and then moving them should not cause anything in your model to be deleted. You would have to recreate the Power Query link and edit the M code as a C drive, OneDrive, and Sharepoint connection are all a bit different, but that is just the first 2-4 steps until you read the binary .xlsx file in. (Binary in the sense that XLSX is a ZIP file and Power BI has to crack it open, not binary in that any of your data is binary)

 



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

The xlsx file is not corrupt - I can open this fine in Excel. It's in Power BI - so I can open the file in Power BI but I cannot apply changes or refresh as I receive the below error -

DataFormat.Error: File contains corrupted data.
Details:
[Binary]

Hi,

 

Thanks for your reply - my concern isn't that the measures were deleted as I put those back really quickly. My issue is that I am now having the below error for a second time - 

 

DataFormat.Error: File contains corrupted data.
Details:
[Binary]

 

When I click on go error - it takes me to the source and shows me "sheet1" and "table1" but doesn't give me any idea of where the error lies. The file is an xlsx file - there is one column that could be perceived as a binary as it always a 1 but is imported as a number so i'm not sure that that is the issue.

What happens if you do this?

  • refresh the data (not refresh preview, but all of it)
  • Open, save, and close the excel file, then refresh again?

It has nothing to do with that 1. a binary error is not an error in data that is binary (0 or 1) but in the file itself, which is considered a binary data source.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Refreshing I get the "File contains corrupted data" error. 

 

I have tried opening, saving, closing but it doesn't seem to make any difference 😣

I am pretty sure the error is with your Excel file, not your PBIX.

Test this:

  • Save the Excel file.
  • Close the Excel file.
  • Make a copy of it.
  • Open the original Excel file.
  • Delete 99% of the data so it is really small.
  • Save and close the file
  • REfresh the PBIX.

What happens then? And as an aside, how big is this file?



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

File is 33.3mb - I did try splitting this into 2 files yesterday and then was going to append but I had the same issue.

 

I have just cut the file down to 20,000 rows and it refreshed. Does that mean there's an error in the other however many rows or?

 

Do we know why it would randomly bring up the error though even though I have worked on it for several hours today with no problems? It was only when I added a conditional column that it appeared to cause an error.

I would be inclined to open a support ticket with MS at the bottom of the Power BI support page. I cannot do that as the file I was having an issue with I got rid of and we moved to a direct SQL access, but it seems clear that there is a glitch in Power BI Desktop with larger Excel files on Sharepoint that started probably with the April desktop update.



Did I answer your question? Mark my post as a solution!
Did my answers help arrive at a solution? Give it a kudos by clicking the Thumbs Up!

DAX is for Analysis. Power Query is for Data Modeling


Proud to be a Super User!

MCSA: BI Reporting

Helpful resources

Announcements
secondImage

Congratulations!

We are excited to announce the Power BI Super Users!

Wave Release 2

Check out the updates in Power BI.

Overview of Power BI 2020 release wave 2!

Microsoft Ignite

Microsoft Ignite

Join digitally, March 2–4, 2021 to explore new tech that's ready to implement. Experience the keynote in mixed reality through AltspaceVR!

secondImage

The largest Power BI virtual conference

100+ sessions, 100+ speakers, Product managers, MVPs, and experts. All about Power BI. Attend online or watch the recordings.

Top Solution Authors
Top Kudoed Authors