Forum Discussion
Error with SharePoint OneDrive folder when switching from Power BI desktop to online
- 3 years ago
Ok, well it's the same error but on a different query (Query1) this time.
My first guess would be that PQ is picking up a parameter file that's of a different format to the other files in the query. Do you have mixed file types in your source folder and, if you do, what measures have you already taken within the query to exclude these from both the sample file parameter and the transform & combine query?
Pete
Sorry, the Query name has changed because I isolated the issue in a new PBIX file. The folder only has Excel files and I filter on the extension just to make sure.
In order to eliminate the sample file as a potential issue, I removed it from Power Query and changed the function that gets generated to not need it:
= (Parameter1) => let
Source = Excel.Workbook(Parameter1, true, true),
Assignments1 = Source{[Name="Assignments"]}[Data]
in
Assignments1
It looks like this error gets thrown by PBI for a number of reasons, with a number of different solutions.
I'd try the following, in order of severity, per the thread linked below:
1) Inspect each of the Excel files from the File menu within each file in case of any XML errors etc.
2) Also ensure that none of the Excel files are password protected.
3) Close PBI Desktop, delete cache files and restart.
4) Uninstall PBI Desktop, delete cache files and reinstall.
https://community.powerbi.com/t5/Desktop/File-contains-corrupted-data/m-p/548620
Pete