Power BI Union Two Tables: Step-by-Step Guide
In this article
To union two tables in Power BI, the quickest reliable route is Power Query: open the Query Editor, make sure both tables have identical column names and the same number of columns, then append one to the other using Home > Append Queries (or Append Queries as New). The result is a single table with the rows of both stacked vertically. If you only need a one-off DAX result, you can also use the UNION function in a calculated table, but Power Query is the better choice for a reusable model.
Union means stacking rows, not joining columns side by side. If you need to match rows on a key, that is a merge (join), not a union. Keep that distinction in mind because most confusion around this task comes from expecting a join result.
What You'll Need
- Power BI Desktop installed and a report open (the steps below are for Desktop; Power BI Service has no full Power Query editor for this).
- Two or more tables already loaded into the model, or available as queries in Power Query.
- Column headers that match, or a plan to rename them so they match.
- Basic awareness that menu labels can differ slightly by version, device or region.
Step-by-Step
- Open Power Query. On the Home ribbon, click Transform data. The Power Query Editor opens in a separate window.
- Inspect both tables. In the Queries pane on the left, click the first table. Note the exact column names and their order. Repeat for the second table. Write them down if there are many columns.
- Align the columns. For a clean append, both queries need the same columns. If a column is missing in one table, add a custom column with a placeholder value (for example, null or a text label like "Source A") so the shapes match. If names differ but mean the same thing, right-click the header and choose Rename.
- Check data types. Select each column header and confirm the type (Text, Whole Number, Date, and so on) is the same in both queries. Mismatched types are the most common cause of errors after appending.
- Start the append. Select the first query in the Queries pane, then go to Home > Append Queries. If you want to keep the originals untouched, use Append Queries as New instead, which creates a separate query.
- Choose Two tables in the append dialog (or Three or more tables if you have more). Pick the first table as the primary and the second as the table to append. Click OK.
- Review the result. The new query shows the combined rows. Scroll through and check that values landed in the correct columns and that no column is entirely null when it should not be.
- Rename the query. Right-click the new query and rename it to something meaningful, such as Combined Sales.
- Load it. Click Close & Apply on the Home ribbon. The combined table is now in your data model and can be used in visuals.
If you prefer DAX, you can create a calculated table with a formula such as Combined = UNION ( Table1, Table2 ). The UNION function requires the same number of columns in the same order, and it returns only the rows, not the original column names from both tables. Calculated tables increase model size, so use them sparingly.
Common Mistakes
- Using Merge instead of Append. Merge joins columns horizontally on a key; Append stacks rows. If your result looks wide and duplicated, you merged by mistake.
- Mismatched column counts. Appending tables with different numbers of columns produces nulls or errors. Add or remove columns first.
- Different column names. Power Query matches by position, but confusing headers make the result hard to read. Rename before appending.
- Different data types. A text column appended to a number column can break sorting and aggregation. Fix types in each query before the append step.
- Appending the wrong direction. The first table in the dialog sets the column order; the second is mapped onto it. If columns land in the wrong place, check the order.
- Forgetting to refresh. After Close & Apply, existing visuals may need a refresh to show the combined data.
Tips
- Add a source column before appending (for example, a custom column with the table name). It makes filtering and troubleshooting much easier later.
- Use Append Queries as New so the original queries remain available for other reports or checks.
- Keep column order identical in both queries; it reduces mapping errors and makes the append step predictable.
- If you will append regularly, build the append step once and let refresh handle new rows.
- For more than two tables, use the Three or more tables option in one step rather than chaining multiple appends.
Troubleshooting
If the append fails or the result looks wrong, work through these checks in order:
- Error in a step. Click the step in Applied Steps and read the message. Most append errors point to a column count or type mismatch.
- Nulls in unexpected columns. This usually means a column exists in one table but not the other, or the headers are in a different order. Compare the two queries side by side.
- Values in the wrong column. Reorder columns in one query so both match, then redo the append.
- Data type warning. Change the column type in each source query, not just in the appended result, so refreshes stay clean.
- Visuals not updating. Click Refresh on the Home ribbon; if that does not help, check that the visual is using the new combined table and not the original.
- Query is slow. Large appends can be heavy. Filter rows earlier in each query and remove unused columns before appending.
If none of that works, duplicate the two queries, strip them down to a few columns, and append the copies to isolate which column is causing the problem.
Frequently Asked Questions
What is the difference between union and merge in Power BI?
Union (Append) stacks rows from two tables into one longer table. Merge (Join) combines columns from two tables by matching a key. Use append when the tables have the same structure; use merge when you need related fields side by side.
Can I union tables with different column names?
Yes, but the result maps by position, so the headers from the first table are used. Rename columns so they match before appending to avoid confusion.
Do the tables need the same number of columns?
For a clean result, yes. If one table has fewer columns, the missing values appear as null. Add placeholder columns if needed.
Should I use Power Query or DAX UNION?
Power Query is preferred for reusable models because it keeps the transformation in the query and does not add a calculated table to the model. DAX UNION is fine for a quick calculated table but uses more memory.
Can I append more than two tables at once?
Yes. In the Append dialog, choose Three or more tables and select all the queries you want to combine.
Why are my rows duplicated after appending?
Appending does not remove duplicates. If both tables contain the same rows, the combined table will too. Use Remove Duplicates on the appended query if that is not what you want.