Power Query Problems

How to Combine Power Query Tables and Consolidate Duplicate Columns in Excel

John WilsonJohn Wilson Nov 10, 2026 869 views

Question details

The user wants to append multiple tables in Power Query and merge the resulting duplicate columns that share the same data context (e.g., DOB and DOB1) into a single column.

Combine Power Query Tables and Consolidate Duplicate Columns
Product
Excel
Device & OS
not provided
Scenario
Appending datasets with slightly different column headers, which creates duplicate columns containing mutually exclusive data.
Observed behavior
The appended table generates separate columns for the same data attribute, scattering the data across multiple columns with null values filling the gaps.
Before you start

Before consolidating your duplicated columns, ensure that both columns are set to the exact same Data Type (e.g., Date) to avoid errors during the merge process.

Solution 1Recommended

Consolidate Columns using the Built-in Merge Feature

Use the built-in Merge Columns tool to quickly combine duplicate columns into one when values are mutually exclusive across rows.

This method is ideal when each row only contains a value in one of the duplicated columns, meaning the data is mutually exclusive. Power Query will safely merge the non-null values.

1
Select the duplicate columns

In the Power Query Editor, hold down the 'Ctrl' key and click the headers of the columns you want to consolidate (for example, DOB and DOB1).

2
Apply the Merge Columns action

Navigate to the 'Transform' tab (to replace the existing columns) or the 'Add Column' tab (to keep the originals and create a new one), then click on 'Merge Columns'.

3
Configure the merge settings

In the pop-up window, choose a separator if necessary (select 'None' if you are just replacing nulls) and type a name for the new consolidated column.

4
Format the final column

Select the newly merged column, click the data type icon next to the header, and set the Data Type back to 'Date'.

Consolidate Columns using the Built-in Merge Feature
Check for Overlapping Data: Make sure no single row contains values in both columns being merged. If both columns have text or data in the same row, the Merge tool will concatenate them together.
Free Microsoft Office alternative

Edit Spreadsheets and Analyze Data Seamlessly with WPS Office

While advanced M-code and Power Query environments are specific to Microsoft Excel, WPS Office provides a highly compatible, lightweight, and completely free alternative for managing spreadsheets, consolidating data, and handling complex formulas.

  1. 1. Download the software: Visit the official WPS Office website and download the free installation package.
  2. 2. Install and launch: Run the installer and follow the on-screen prompts. Once installed, launch WPS Spreadsheet.
  3. 3. Open your files: Directly open your existing Excel workbooks to start editing, analyzing, and formatting your data instantly.
Fully compatible with Microsoft Excel (.xlsx, .xls, .csv) formats without data loss.Lightweight application requiring fewer system resources for fast startup.Familiar ribbon interface ensuring a zero learning curve for Office users.Built-in advanced formulas, pivot tables, and intuitive data consolidation tools.
microsoft office alternative - wps office

Frequently Asked Questions

Why does appending tables create duplicate columns in Power Query?

This happens when the tables being appended have slightly different column headers (e.g., 'DOB' in Table A and 'DOB1' in Table B). Power Query strictly matches exact header names; if they differ, it creates a separate column for each unique header.

Can I merge more than two duplicated columns at once?

Yes. You can select multiple columns by holding down the Ctrl key and clicking each header. When you use the Merge Columns feature, Power Query will merge the non-null values across all the selected columns into one.

What happens if both columns have a value in the exact same row when merging?

If you use the standard 'Merge Columns' feature, Power Query will concatenate both values together as text. If you want to prioritize one value over the other instead of concatenating them, it is better to use the Custom Column approach with an 'if...then...else' formula.