Join us at FabCon Atlanta from March 16 - 20, 2026, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.
Register now!The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!
I am trying to create a query that lists all files from a SharePoint 2010 document respository that has files within sub folders. I am able to connect to the repository. However, when I expand the Content table to get the names and other attributes of the files within the folders, I get the following error: "OLE DB or ODBC error: [Expression.Error] We cannot convert a value of type Binary to type Table".
Here are the query steps:
let
Source = SharePoint.Contents("https://xxx/", [ApiVersion = 14]),
SharedDocuments = Source{[Name="SharedDocuments"]}[Content],
#"Expanded Content" = Table.ExpandTableColumn(SharedDocuments, "Content", {"Name", "Extension", "Attributes"}, {"Content.Name", "Content.Extension", "Content.Attributes"})
in
#"Expanded Content"The error occurs only when trying to apply the query changes after the last step is added.
Any ideas on why I'm getting the error? There are no errors when the step is created, and I've been able to create subsequent steps as well (e.g. expand the Attributes column, filter rows, etc.) and save the file, but can't apply the query.
Thanks!
Solved! Go to Solution.
Solved my own issue - in addition to having files in folders there are some files in the root folder. These files have a content type of Binary, while all the folders have a content type of Table, thus the error.
To address this issue, I need to filter out the files in the root folder and then expand the table columns. Since I want to include the files located in the root folder, I'll likely need to create a second query for those and merge the two together.
Solved my own issue - in addition to having files in folders there are some files in the root folder. These files have a content type of Binary, while all the folders have a content type of Table, thus the error.
To address this issue, I need to filter out the files in the root folder and then expand the table columns. Since I want to include the files located in the root folder, I'll likely need to create a second query for those and merge the two together.
The Power BI Data Visualization World Championships is back! It's time to submit your entry.
Check out the January 2026 Power BI update to learn about new features.
| User | Count |
|---|---|
| 57 | |
| 40 | |
| 27 | |
| 25 | |
| 23 |
| User | Count |
|---|---|
| 127 | |
| 108 | |
| 54 | |
| 39 | |
| 33 |