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

The Power BI Data Visualization World Championships is back! It's time to submit your entry. Live now!

Reply
somethingbig
Frequent Visitor

SharePoint Folder Connection - Cannot Apply Query Changes After Expanding Table

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

Capture.PNG

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!

1 ACCEPTED SOLUTION
somethingbig
Frequent Visitor

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.

View solution in original post

1 REPLY 1
somethingbig
Frequent Visitor

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.

Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! It's time to submit your entry.

January Power BI Update Carousel

Power BI Monthly Update - January 2026

Check out the January 2026 Power BI update to learn about new features.

FabCon Atlanta 2026 carousel

FabCon Atlanta 2026

Join us at FabCon Atlanta, March 16-20, for the ultimate Fabric, Power BI, AI and SQL community-led event. Save $200 with code FABCOMM.