How to Combine Two CSV Files into One Dataset in Power BI
Learn how to combine two CSV files into one dataset in Power BI using the Power Query Editor. This blog covers importing, merging, and transforming data to create a unified dataset, ensuring consistency and accuracy for seamless analysis and reporting.
POWER BI
Simplify Your Data Analysis: Combining CSV Files into One Dataset in Power BI
CSV files are a common format for storing and sharing data. If you have multiple CSV files that need to be analyzed together, Power BI makes it easy to combine them into one seamless dataset. Follow this step-by-step guide to streamline your data preparation and create impactful insights.
Step 1: Prepare Your CSV Files
Before loading the files into Power BI:
· Ensure Consistent Structure: Both CSV files should have the same column headers and data types.
· Clean Your Data: Remove empty rows, irrelevant columns, and duplicate entries to avoid confusion.
· Place Files in a Single Folder: For ease of automation, store the files in the same folder.
Step 2: Open Power BI Desktop
1. Download Power BI Desktop (if you haven’t already) from the Power BI website.
2. Launch the application and open a new file.
Step 3: Load Your CSV Files into Power BI
1. Click on “Get Data” from the Home ribbon.
Do you need help with your data? Contact us to schedule a consultation and take the first step toward unlocking your data's potential!


2. Select Text/CSV and locate the first file.




3. Repeat this process for the second CSV file, loading both into Power BI.
Step 4: Combine the Files in Power Query Editor
1. Once both files are loaded, navigate to the Transform Data option to open Power Query Editor.


2. Append Queries:
a. On the ribbon, select Append Queries and choose Append Queries as New.
b. In the dialog box, select the two CSV files you loaded.
c. Click OK to combine them into a single dataset.


3. Preview the combined data to ensure it looks correct.




Step 5: Transform the Combined Data (Optional)
Use Power Query Editor to clean and shape your combined dataset:
· Remove Duplicates: If the files have overlapping data, remove duplicates.
· Filter Rows: Exclude unnecessary records based on specific criteria.
· Rename Columns: Ensure column names are clear and descriptive.
· Click Close & Apply to load the cleaned dataset into Power BI.
Step 6: Build Relationships (If Needed)
If you need to connect the combined dataset to other tables or data sources:
1. Open the Model View in Power BI.
2. Drag and drop fields to establish relationships between tables.
3. Validate the relationships to ensure data integrity.
Step 7: Create Visualizations
Now that your data is combined, it’s time to visualize it:
· Use bar charts, line graphs, or heat maps to present key metrics.
· Add slicers to filter data by specific attributes.
· Create dashboards to provide an overview of the dataset.
Step 8: Automate Updates for Dynamic CSV Files
If you frequently update or add files to the folder:
1. Use the Folder Connector in Power BI.
2. Load all files from the folder and enable automatic updates.
3. Power BI will append new files automatically, keeping your dataset up to date.
Step 9: Save and Publish
1. Save your Power BI file (*.pbix) locally.
2. Publish it to Power BI Service to share with your team or stakeholders.
Why Combining CSV Files Matters
Merging multiple CSV files into one dataset in Power BI simplifies your workflow, reduces manual effort, and ensures consistent analysis. It’s an essential skill for businesses aiming to make data-driven decisions efficiently.
For expert advice or assistance with Power BI, reach out to Insighthuis. Together, we can turn your data into actionable insights.
Insighthuis, building success with data-driven decisions.
Maastricht, Netherlands
Call us: +31 (6) 49158701 / +31 (6)85450973
Contact us: info@insighthuis.com