Combine multiple files (binaries) in Power BI or Folder Connector in Power BI

Combining multiple Excel files (or any structured files) using the Folder connector in Power BI is a powerful way to automate data loading and appending — especially useful when you have monthly or yearly files with the same schema.

Scenario:

We have multiple Excel files, like:

Each contains the same structure:

Goal: Use Power BI’s Folder Connector to:

Combine Multiple Files Using Folder Connector

Step 1: Place All Files in a Folder Put all Excel files in one folder on the computer (e.g., D:\StudentFiles\).

Step 2: Power BI Desktop → Get Data → From Folder
• Go to Home > Get Data > Folder
• Select the folder path (D:\StudentFiles\)
• Click OK

Folder connector in Power BI

Step 3: Power BI shows list of files It shows the list of all the files in the folder, now click on Transform Data which open the power query editor.

Folder connector in Power BI

In the Power query editor, we can filter the files based on the extension, name or any other custom way.

Folder connector in Power BI

Internally the Folder connector use the Folder.Files M function.

To combine binary files in Power Query Editor, select Content (the first column label) and choose Home > Combine Files. Or we can just select the Combine Files icon next to Content.

Folder connector in Power BI

A dialog box for Combine Files opened. Select the Sample File and Sheet names which we want to select from each file.

Folder connector in Power BI

We have the option to skip the files with errors. After that click on Ok.

Now the Power BI automatically, do the transformation on the Sample File, as shown in the image below:

Folder connector in Power BI

Also, it creates a function query which is linked to the query of the Transform Sample File. So whatever transformation we still further applied to the Transform Sample File is automatically reflected in the function Transform File.

Folder connector in Power BI

Also, the Power BI applied this function to the binary input of each row of the original table.

Folder connector in Power BI

After that the column name is changed from Name to Source.Name.

Folder connector in Power BI

After that we select only two columns required further and then expand the table to get all the rows from the table.

Folder connector in Power BI

Finally, we received the output which is the appending all the table tows in one table.

Folder connector in Power BI

Here, all the transformation steps are automatically applied by the Power BI Combine operation, but we can customize any transformation step according to our requirement. So, we can easily combine all files within a given folder if they have the same file type and structure (such as the same columns). If we add or remove files from the folder the Power BI automatically fetches the latest data from the folder when we refresh our query in Power BI.