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

Be one of the first to start using Fabric Databases. View on-demand sessions with database experts and the Microsoft product team to learn just how easy it is to get started. Watch now

Reply
D_PBI
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?
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
Las Vegas 2025

Join us at the Microsoft Fabric Community Conference

March 31 - April 2, 2025, in Las Vegas, Nevada. Use code MSCUST for a $150 discount!

Dec Fabric Community Survey

We want your feedback!

Your insights matter. That’s why we created a quick survey to learn about your experience finding answers to technical questions.

ArunFabCon

Microsoft Fabric Community Conference 2025

Arun Ulag shares exciting details about the Microsoft Fabric Conference 2025, which will be held in Las Vegas, NV.

December 2024

A Year in Review - December 2024

Find out what content was popular in the Fabric community during 2024.

Top Solution Authors