Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
6 years ago

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!

12 Replies

  • edhans's avatar
    edhans
    Community Champion

    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)

     

    • Anonymous's avatar
      Anonymous
      Not applicable

      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.

      • edhans's avatar
        edhans
        Community Champion

        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.

    • Anonymous's avatar
      Anonymous
      Not applicable

      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]

  • v-gizhi-msft's avatar
    v-gizhi-msft
    Community Support

    Hi,

     

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

     

    Best Regards,

    Giotto

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

  • Abhilash7181's avatar
    Abhilash7181
    Frequent Visitor

    I had same issue with my pbix report, what i did is i stored same datasource file in another sharepoint folder and again connected with new pbix report and published it into power bi service and it worked. Report refreshed successfully. The issue was with sharepoint folder only. This solution is only for the report which is giving File Contains Corrupted Data error and the datasource is sharepoint folder.
    Please mark this as a soultion, if this can resolved issue.  

  • I had the same issue. After I removed both the passwords the document had (for opening and for editing), the query refreshed as normal.