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

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now! Learn more

Reply
Anonymous
Not applicable

Combining tables from files in a Sharepoint folder

Hi,

Fairly new to PQ with Excel and have run into a wall and would greatly appreciate some help.

 

Background

- Sharepoint folder holding up to 20 files with one table each with same structure, do not expect more than 40-50 rows each.

- I want to merge them into one master table for follow up purposes, frequency ones a week

 

Existing working solution

- One query per existing file using =Excel.Workbook(Web.Contents("full Sharepoint path to the file"), null, true)

- A Table.Combine({query1, query2, ...}) covering the existing files.
Drawback is that whenever there is a need to add a new file or rename them, a PQ query adjustment need to happen, which is not fitting the users experience level.

 

Wanted approach

- Ability to load all files within the Sharepoint folder

 

Challenge

- Org. credentials work fine when referencing single files, but not for the folder. Have tried to reference the site path, without success. I am even one of the owners of the site so should not be a constraint.

 

Alternative approach (clunky)

- Setting up an Excel table with the names of the files including the path and load the table to PQ. Next is then to get the tables from the files and combine them.

 

Challenge

- I lost a way fowrad on this  - generating queries from the table and then combining them, or is there another way?

3 REPLIES 3
christinepayton
Super User
Super User

This is exactly what the SharePoint folder connector does. If you do get data -> SharePoint folder, give it your site URL, then filter that query on the path column to the specific folder you want, and expand, that should do it. 🙂

Anonymous
Not applicable

Hi, yes I have tried that one, but - as the Sharepoint structure is big, it becomes very very slow to read and update the query.  

bhanu_gautam
Super User
Super User

@Anonymous , Check this video it will help

 

https://www.youtube.com/watch?v=5X7OcolRjzk




Did I answer your question? Mark my post as a solution! And Kudos are appreciated

Proud to be a Super User!




LinkedIn






Helpful resources

Announcements
Power BI DataViz World Championships

Power BI Dataviz World Championships

The Power BI Data Visualization World Championships is back! Get ahead of the game and start preparing now!

December 2025 Power BI Update Carousel

Power BI Monthly Update - December 2025

Check out the December 2025 Power BI Holiday Recap!

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.