How to Combine Rows in Power BI
Trying to analyze sales data when January's numbers are in one file, February's in another, and March's are in a third is a recipe for a headache. Stacking these separate datasets on top of each other into one master table is a fundamental step in data analysis. This article will show you exactly how to combine rows from multiple tables using Power BI's powerful Power Query Editor.
"Combine Rows" Sounds Simple, But What Does It Mean? Append vs. Merge
In the world of data tools, the word "combine" can mean a few different things. Power BI makes a critical distinction between two key operations: Appending and Merging. Understanding the difference is the first step to getting the result you actually want.
Appending Queries: Stacking Data (Adding Rows)
Appending is what most people mean when they say "combine rows." Think of it as stacking tables vertically on top of one another. If you have a table of Q1 sales and another table of Q2 sales, appending them puts the Q2 data directly below the Q1 data, creating one continuous list.
- The number of rows increases.
- The number of columns stays the same (assuming your tables have the same structure).
For example, you start with these two tables:
Q1 Sales
Q2 Sales
When you append them, you get one unified table:
Total Sales
Merging Queries: Joining Data (Adding Columns)
Merging is a completely different process. It's like a VLOOKUP in Excel. You join two tables side-by-side, joining them horizontally based on a matching column.
- The number of rows typically stays the same.
- The number of columns increases as you bring in information from the second table.
For example, if you took that Total Sales table and wanted to add product names from a separate Product Details table, you would merge them.
Product Details
When you merge them based on ProductID and Product_ID, you'd get this:
Enriched Sales Data
For this tutorial, we are focusing entirely on Appending Queries to combine rows.
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.
The Golden Rule for Appending: Consistent Columns
Before you start appending, there's one critical prerequisite for a clean result: your tables should have a similar structure. Ideally, the column names and data types should match exactly across all the tables you plan to combine.
For instance, if one table has a column named SaleDate and the other has Transaction_Date, Power Query will see these as two totally different columns. When you append them, you'll end up with a combined table that has both columns, filled with a lot of null (empty) values where the data didn't exist.
Example of a messy append:
Fixing this is simple: before you append, rename the columns in Power Query so they match. A little prep work goes a long way to keeping your final table clean and usable.
Step-by-Step Guide: How to Append Rows in Power BI
Ready to combine your tables? Let's walk through the process inside the Power Query Editor, Power BI's data transformation hub.
Step 1: Open the Power Query Editor
First things first, you need to get to the right tool. In Power BI Desktop, look at the Home tab of the ribbon at the top. Click on the Transform data button. This will launch a new window: the Power Query Editor.
Step 2: Get Your Data Ready
Before you can append tables, they need to be loaded as queries into the editor. Use the New Source button to load your Excel files, CSVs, or connect to your database. For this example, let's assume you've already loaded three tables: Sales_Jan, Sales_Feb, and Sales_Mar.
In the Queries pane on the left, you'll see a list of your tables.
Step 3: Choose Your Append Method
In the Power Query Editor's Home tab, find the Append Queries command in the "Combine" section. It has a little dropdown arrow with two options:
- Append Queries: This option takes a second table and appends it into the table you currently have selected. For example, if you have
Sales_Janselected and choose this option, it will add the rows fromSales_FebtoSales_Jan. This changes your original query. It's fine for a quick and dirty combination, but it's often better to preserve your original data sources. - Append Queries as New: This is generally the best-practice method. It takes your selected tables and combines them into an entirely new query, leaving your original source tables untouched. This keeps your data transformation steps clean and easy to troubleshoot.
We'll use Append Queries as New for this guide.
Step 4: Select Your Tables
After clicking "Append Queries as New," a dialog box will appear. Here, you'll specify which tables to combine.
- Two tables: If you're just combining two data sets, this is the default. Use the dropdowns to select your "Primary table" and the "table to append to the primary table." The order rarely matters here.
- Three or more tables: If you're combining several tables (like our Jan, Feb, and Mar sales), select this option. It changes the interface, showing your available tables on the left and a blank list on the right. Select your tables from the left, click Add >>, and move them to the "Tables to append" list.
Once you've selected all the tables you want, click OK.
Step 5: Review and Rename Your Combined Table
Power Query will instantly perform the operation. A new query will appear in the Queries pane, likely named something generic like Append1. Right-click on it and choose Rename to give it a sensible name, like Sales_Q1.
Take a moment to inspect your new table. Do the row counts add up correctly? Are all the columns populated, or do you see unexpected null values? If everything looks good, you can click Close & Apply in the top-left corner to load your new, unified table into your Power BI 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.
Pro Tip: Automatically Combine All Files in a Folder
Manually appending files works well for a few tables, but what if you get a new sales file every single month? You don't want to repeat this process over and over. This is where Power Query's "From Folder" connector shines.
Imagine a folder on your computer where you save your monthly sales CSV files: Sales_2024_01.csv, Sales_2024_02.csv, Sales_2024_03.csv, and so on.
- In Power Query Editor, go to New Source > More...
- Select Folder from the list and click Connect.
- Browse to the folder containing your files and click OK.
- A preview window shows you a list of the files in that folder. Don't load this! Instead, click the Combine & Transform Data button.
- Power Query will then look at the first file to understand its structure (columns, data types, etc.) and use it as a sample. Confirm your settings in the next dialog (it's usually correct by default) and click OK.
And that's it! Power Query works its magic. It creates a function that opens each file, cleans it up based on the sample, and then automatically appends them all together into one master query. It even adds a helpful Source.Name column so you can see which file each row originally came from.
The best part? This connection is dynamic. Next month, when you drop Sales_2024_04.csv into that folder and refresh your Power BI report, the new data will be included automatically. No extra steps required.
Final Thoughts
Combining rows in Power BI is all about using the "Append Queries" feature within the Power Query Editor. By stacking your component tables into a single, unified dataset, you make creating visualizations and analyzing trends far simpler and more effective. For ultimate efficiency, combining all files in a folder automates your reporting workflow for good.
Setting up these data pipelines saves a lot of manual work, but building the actual reports in a tool like Power BI still comes with a learning curve. That's why we built Graphed to simplify the entire analytics process. We connect directly to your marketing and sales platforms (like Google Analytics, Shopify, Facebook Ads, or even Google Sheets) and let you build real-time, interactive dashboards just by describing what you want in plain English. No need to learn data modeling or wrestle with pivot tables, just ask your data questions and get instant insights, allowing you to focus on strategy instead of report-building.
Related Articles
Facebook Ads for Carpet Cleaners: The Complete 2026 Strategy Guide
Learn how to run Facebook ads for carpet cleaning businesses in 2026. Get proven strategies for targeting, creative formats, retargeting, and budget that actually convert.
Facebook Ads For Personal Trainers: The Complete 2026 Strategy Guide
Learn how to effectively use Facebook ads for personal trainers in 2026. This comprehensive guide covers targeting strategies, ad creative, budgeting, and optimization techniques to help you grow your training business.
Facebook Ads for HVAC Companies: The Complete 2026 Strategy Guide
Learn how to run high-converting Facebook ads for HVAC companies in 2026. This guide covers targeting, creative strategies, and proven campaigns that drive real leads.