How to Load Multiple CSV Files in Power BI
If you're managing regular reports - like monthly sales exports, weekly ad performance, or daily web traffic data - you're likely all too familiar with a folder full of CSV files. Combining them into one master dataset can feel like a chore. This tutorial walks you through the simplest and most powerful way to automatically load and combine multiple CSV files from a single folder directly into Power BI.
Why Bother Combining CSV Files Directly in Power BI?
Before jumping into the "how," let's quickly touch on the "why." Manually opening each CSV, copying the data, and pasting it into a master spreadsheet is not only tedious but also prone to human error. A single misplaced row or an accidental mis-paste can throw off your entire analysis.
When you handle this process in Power BI, you are building an automated and repeatable workflow. Once you set it up, all you have to do is drop a new file into your specified folder. The next time you refresh your Power BI report, the new data is pulled in, cleaned, and combined automatically. This is a huge time-saver and ensures your reporting is consistent and reliable.
Common scenarios where this is incredibly useful include:
- Consolidating monthly or quarterly sales reports exported from a CRM.
- Combining daily activity logs from a web server or IoT devices.
- Merging campaign performance data from different ad platforms, saved as CSVs.
- Stitching together regional performance files submitted by different teams.
Let's build this automated workflow step-by-step.
The Best Method: Using the 'From Folder' Connector
Power BI has a built-in connector specifically designed for this exact task. The 'From Folder' connector points Power BI to a folder on your computer (or a shared network drive), looks at all the files inside, and gives you the tools to combine them. For this to work best, make sure all the CSV files you want to combine are located in the same folder and have a similar column structure.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Step 1: Point Power BI to Your Folder
Open a new Power BI report. In the main ribbon, navigate to the Home tab, click on Get Data, and select More....
This will open the Get Data window, which lists all of the available data connectors. In the search bar, type "Folder" or select it from the All or File category, and then click Connect.
Step 2: Browse and Select Your Folder
In the next dialog box, click Browse... and navigate to the folder where you have stored your CSV files. Once you've selected it, click OK. Power BI will then display a preview window showing the metadata for all the files it found in that folder, such as the file name, extension, date accessed, and so on.
You’ll see a few options at the bottom of this window. The best choice for this task is Combine & Transform Data. This option tells Power BI you want to combine the files, but you also want to open the Power Query Editor to check the data and potentially perform some cleaning steps, which is almost always a necessary step.
Step 3: Tell Power BI How to Combine the Files
After clicking "Combine & Transform Data," Power BI presents a "Combine Files" dialog box. This is where you give Power BI its instructions. Essentially, Power BI needs a blueprint. It will look at one file from your folder to understand the structure (like column headers and data format) and then apply that same logic to every other file in the folder.
Here are the key options to configure:
- Sample File: You can select which file Power BI should use as the sample. Most of the time, "First File" is perfectly fine. The only reason to change this is if you know a different file is a more complete or accurate representation of the structure you expect for all files.
- File Origin: This is generally left as the default unless your files use a specific encoding.
- Delimiter: This is an important one. A CSV is a "Comma-Separated Values" file, so "Comma" is the default. However, files from different regions or systems might use a semicolon, tab, or another character. The data preview below will show you if the columns are separated correctly. If it looks like one giant, messy column, try changing the delimiter here until the data snaps into clean columns.
Once you’re happy with the preview, click OK. Power BI will now perform its magic in the background, creating a special function that processes each file before stacking them into a single table. It then opens the Power Query Editor, a powerful tool for shaping and cleaning your data before it's loaded into your final report.
Verifying and Cleaning Your Combined Data in Power Query
Inside the Power Query Editor, you'll see your combined data. All the rows from your individual CSV files are now stacked on top of each other in one query. You’ll also notice a new column was added at the very beginning by default: Source.Name. This column contains the filename that each row came from, which is incredibly useful.
Perfectly clean data is rare. Here are a few common data cleaning tasks you should perform before loading the data.
Check and Correct Data Types
Power BI does its best to guess the data type for each column (e.g., Whole Number, Decimal Number, Date, Text). You can see the icon for the determined data type next to each column header. Sometimes, these guesses are wrong. For example, a "Product ID" column might be read as a number, but since you'll never do mathematical calculations with it, it's better as Text. To change a data type, simply click the icon on the column header and select the correct type from the dropdown list.
Maximize the 'Source.Name' Column
Let’s say your files are named systematically, like Sales_Data_January_2024.csv, Sales_Data_February_2024.csv, etc. You can extract this valuable date information and turn it into its own column.
- Select the Source.Name column.
- Go to the Transform tab in the ribbon.
- Click Split Column > By Delimiter.
- Choose the underscore
_as your delimiter and split at "Each occurrence of the delimiter."
This will create multiple new columns. You might now have Sales, Data, January, and 2024.csv. You can delete the unnecessary columns (like the first two) and combine the month and year columns. You can even take the last column and remove .csv by using the Replace Values feature. Doing this transforms a simple filename into usable dimensions for filtering and analyzing your final report.
Free PDF · the crash course
AI Agents for Marketing Crash Course
Learn how to deploy AI marketing agents across your go-to-market — the best tools, prompts, and workflows to turn your data into autonomous execution without writing code.
Handling Files with Slightly Different Columns
What happens if a new CSV file contains a column that wasn't in the others, or is missing one?
Power BI's logic is based on the column headers from your sample file. If a new file has a column that didn’t exist in the sample, that column might not appear in your final dataset. Conversely, if a file is missing a column that is in the sample, its rows will simply have 'null' values for that column, which is usually fine.
The best way to handle evolving column structures is to adjust the 'template' that Power BI uses. On the left side of the Power Query Editor, under "Helper Queries," you will find a query named Transform Sample File. Any transformation you apply here will be applied to every single file before it is combined. If you know that a certain column needs to be renamed for consistency or a column type needs to always be Text, make that change within the Transform Sample File query. This makes your workflow far more robust and resilient to small changes in your source files.
Step 4: Load Your Data
Once you are satisfied with the state of your data in Power Query, it’s time to load it into your report. In the top-left corner of the Power Query Editor, click the Close & Apply button. This will apply all of your transformation steps, combine the files, and load the final, unified table into your Power BI data model. You can now start building visuals and charts with your newly combined dataset!
Final Thoughts
Using Power BI's "From Folder" connector transforms the painful task of manually consolidating CSVs into a one-time setup for an automated data pipeline. By setting this up once, you save yourself hours of future work, reduce the risk of errors, and ensure your reports can be updated with a single click - all you need to do is drop the next file into your folder.
While Power BI's folder connector is fantastic for unifying downloaded files, that manual export process is often its own bottleneck. That's a core problem we designed Graphed to solve. We skip the folder step entirely by connecting directly to your live data sources like Google Analytics, Shopify, Facebook Ads, or HubSpot. Instead of downloading CSVs and loading them into Power BI, you can just ask a question in plain English, and we build a real-time, interactive dashboard for you instantly - no Power Query or data cleaning required.
Related Articles
How to Create Facebook Ads API for Claude Code
Create a Meta Marketing API access token that never expires, using a system user, so Claude Code can pull Facebook ad reports and manage campaigns.
ClickHouse vs Postgres: When to Switch to Columnar
Comparing ClickHouse vs PostgreSQL means matching storage architecture to workload. Row storage wins for transactions. Columnar wins for scan-heavy analytics.
Google Ads for Orthodontists: Get More Booked Consults
Most orthodontic Google Ads campaigns waste money on low-intent searches. The problem is structure, not the platform.