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

Earn a 50% discount on the DP-600 certification exam by completing the Fabric 30 Days to Learn It challenge.

Post Patron
Post Patron

How can PQ perform a specified number of steps for all the files in a specified folder?

Hi all,

I have a task to import the contents of the SharePoint folder and complete a lot of data manipulation on those contents. The content's of this SharePoint folder are many Word (.docx) files. I don't believe Power BI can connect to Word files, so I've requested those Word files be coverted to PDF format. So, essentially, I'm looking to import many PDF files into Power Query.


I have a couple of aims at this moment:
1) Complete all the data manipulation steps I need to do against any one single PDF file.

2) Understand a way to loop over all the PDF files in the specified SharePoint folder and perform the Applied Steps created in 1).


Each PDF file has the same layout as each PDF is derived from the same Word template file.

I cannot import all the PDFs in one go and merge them together as I wil need to add 'flag' columns to each PDF content - hence concentrating on completing all the data manipulation steps first, for a single PDF. Just to add to the mix, each PDF file is made up of 18 tables, or 4 pages. I guess that is the way the original Word template was strucutred. This just adds to my data manipulation steps.


So for your help?
Please can someone direct me to an article or video that will instruct me on how I do the following:

1) Connect to a SharePoint folder.
2) Import all files in that folder based the file type being 'PDF', and the file name containing 'VIRA'.
3) Have Power Query loop around each unique PDF file name that has been imported and perform the exact same 'Applied Steps' that I've already completed (maybe I need to place those Applied Steps in a function (or the like) so it can be called/re-used for each unique PDF file in the SharePoint folder.


I hope that all makes sense.

Can someone help me please?



Super User
Super User

Perhaps if you started with a Folder query and then changed the Source/Navigation to your SharePoint Folder. The standard Folder query is designed to do what you want.

@ me in replies or I'll lose your thread!!!
Instead of a Kudo, please vote for this idea
Become an expert!: Enterprise DNA
External Tools: MSHGQM
YouTube Channel!: Microsoft Hates Greg
Latest book!:
The Definitive Guide to Power Query (M)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources


Fabric certifications survey

Certification feedback opportunity for the community.


Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.

Top Solution Authors
Top Kudoed Authors