You can download all the source files and the solution on the following link. But what if for some reason, we want to get files from different folders and process all of them in a single query? Is it possible to process multiple folders in one query? Yes, it is!įor demonstration purposes, we will use a fictional Toys company based on AdventureWorks demo database. It is a common practice to save all similar files in a single folder and use the Power Query From Folder connector to process all files in a single query.
#Excel power query examples how to
In case you are not familiar with this feature, you can check out this link to find the video in which we explained how to create a custom function and use it upon folder. Processing a whole folder is one of the most powerful features of Power Query. Therefore, utilizing the PowerQuery full potential! The idea is to show you how you can create building blocks from PQ and gradually increase complexity without getting lost in code. Sound complicated? Sort of, but in this article, we will explain many PowerQuery features that can be useful in a variety of situations. We wish to create an automatic refresh system that will work no matter how many files and folders we input. The number of clients, as well as the number of files for each client, will vary across periods.
They store the data in dedicated folders that reside in different places. We have multiple clients sharing their sales data with us.