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

Power BI is turning 10! Let’s celebrate together with dataviz contests, interactive sessions, and giveaways. Register now.

Reply
D_PBI
Post Partisan
Post Partisan

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?
Thanks.

 

 

1 REPLY 1
Greg_Deckler
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.



Follow on LinkedIn
@ 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!:
Power BI Cookbook Third Edition (Color)

DAX is easy, CALCULATE makes DAX hard...

Helpful resources

Announcements
Join our Fabric User Panel

Join our Fabric User Panel

This is your chance to engage directly with the engineering team behind Fabric and Power BI. Share your experiences and shape the future.

June 2025 Power BI Update Carousel

Power BI Monthly Update - June 2025

Check out the June 2025 Power BI update to learn about new features.

June 2025 community update carousel

Fabric Community Update - June 2025

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

Top Solution Authors