To concatenate in Excel Power Query, select the columns you wish to combine, go to the Add Column tab, click Merge Columns, and choose your desired separator. This process allows you to combine data from two or more columns into a single new column without using complex formulas like CONCATENATE or TEXTJOIN found in standard Excel spreadsheets.

Concatenation in Power Query is a fundamental data transformation step. Unlike standard Excel formulas that update in real-time but can slow down a workbook when applied to thousands of rows, Power Query performs these operations during the data loading process. This means your final spreadsheet remains lean and performant while the "heavy lifting" of combining strings—such as merging a First Name and Last Name column into a Full Name column—happens in the background. Whether you are preparing data for a Pivot Table or cleaning up a messy CSV export, mastering the merge tool is essential for efficient data shaping.

What You'll Need

  • Microsoft Excel (Power Query is built-in for versions 2016 and later; for 2010 or 2013, the Power Query add-in must be installed).
  • A dataset loaded into the Power Query Editor (via Data > Get Data).
  • Columns containing text data (or data that can be converted to text).

Step-by-Step

  1. Open the Power Query Editor: Start by importing your data. Go to the Data tab on the Excel ribbon, select Get Data, and choose your source (e.g., From Table/Range or From File). Once the data is loaded, the Power Query Editor window will open.
  2. Select Your Columns: In the Power Query Editor, hold down the Ctrl key on your keyboard and click the headers of the columns you want to concatenate. The order in which you select the columns determines the order in which the text will appear in the final merged column. For example, if you want "City, State," click the City column first and the State column second.
  3. Access the Merge Tool: Navigate to the Add Column tab on the top ribbon. Note that you can also find this under the Transform tab, but using Add Column preserves your original data columns, whereas the Transform tab replaces the original columns with the merged result. Click the Merge Columns button.
  4. Configure the Merge Settings: A dialog box will appear. Here, you must choose a Separator. Common options include Space, Comma, Semicolon, or Colon. If you want the text to run together without any gap, select --None--. If you need a specific character not listed (like a pipe symbol |), select Custom and type the character into the box.
  5. Name Your New Column: In the New column name field at the bottom of the dialog box, enter a descriptive name (e.g., "Full Address" or "Employee ID"). If you leave this blank, Power Query will assign a generic name like "Merged".
  6. Apply and Close: Click OK. You will now see a new column at the end of your table containing the concatenated values. To bring this data back into your Excel worksheet, go to the Home tab and click Close & Load.

Common Mistakes

One of the most frequent errors users encounter is attempting to concatenate columns with mixed data types. Power Query is strictly typed. If you try to merge a Text column with a Whole Number column or a Date column, you may receive an error or find that the Merge Columns button is greyed out. To fix this, you must first change the data type of the numeric or date column to "Text" by clicking the icon next to the column header and selecting Text.

Another common mistake is selecting columns in the wrong order. Because Power Query follows the sequence of your selection, clicking "Last Name" then "First Name" will result in "Smith, John" instead of "John Smith". If this happens, you do not need to restart the process; you can simply delete the merged step in the Applied Steps pane on the right side of the screen and try again.

Users also frequently confuse the Transform tab with the Add Column tab. If you use the Transform tab, your source columns vanish, leaving only the merged result. While this keeps the table clean, it can be problematic if you later realize you need the individual components for filtering or sorting. Always use Add Column unless you are certain the original data is redundant.

Tips

For more advanced concatenation, you can use a Custom Column. Instead of the Merge Columns button, go to Add Column > Custom Column. Here, you can write a simple formula using the ampersand (&) symbol, which is the standard operator for concatenation in Power Query's M language. For example: [FirstName] & " " & [LastName]. This method gives you total control over the formatting and allows you to inject static text into the string, such as "User: " & [Username].

If you are dealing with null values, be careful. In Power Query, concatenating a text string with a null value results in the entire cell becoming null. To prevent this, use the Replace Values feature to change null to an empty string (leave the "Replace With" box blank) before performing the merge. This ensures that your combined column still shows the available data even if one of the source cells was empty.

To maintain a clean workflow, always rename your merged column immediately. When dealing with large datasets with 50+ columns, having multiple columns named "Merged" makes the data model impossible to navigate and leads to errors when creating reports or dashboards.

Troubleshooting

If the concatenation is not working as expected, start with these checks:

1. Check Data Types: If you see "Error" in the cells of your merged column, it is almost always a data type mismatch. Ensure every column involved in the merge is set to the Text data type. Check the icon to the left of the column header; it should be "ABC".

2. Handle Nulls: If your merged column is unexpectedly blank (null), check your source columns for null values. Use the Transform > Replace Values tool to replace null with a blank space or an empty string before merging.

3. Review Applied Steps: If the merged column disappears or changes unexpectedly, look at the Applied Steps pane. Power Query records every action. If you added a step after the merge that filtered out rows or removed columns, it might be affecting the output. You can click the gear icon next to the "Merged Columns" step to modify the separator or column name without deleting the step.

4. Refresh Data: If the changes aren't appearing in your Excel sheet, ensure you have clicked Close & Load. If the data is already loaded, right-click the table in Excel and select Refresh to pull the latest Power Query transformations into the worksheet.

Frequently Asked Questions

Can I concatenate more than two columns?

Yes. You can select as many columns as you need by holding the Ctrl key. Power Query will merge all selected columns in the order they were clicked, applying the chosen separator between each value.

How do I add a line break instead of a space?

In the Merge Columns dialog, select Custom as the separator. However, you cannot simply press Enter in that box. Instead, use a Custom Column and use the formula [Column1] & "#(lf)" & [Column2], where #(lf) is the M language code for a line feed.

Will concatenating in Power Query slow down my Excel file?

No, it is generally faster than using formulas. Power Query processes the data during the refresh cycle, meaning Excel doesn't have to recalculate thousands of concatenation formulas every time you change a cell in the workbook.

What happens if I change the source data?

Because Power Query creates a repeatable set of instructions, any new data added to your source file will automatically be concatenated using the same rules the next time you click Refresh.

Can I merge columns with different languages or special characters?

Yes. Power Query supports Unicode, so it can concatenate text from various languages and include special symbols without any additional configuration.

Is there a way to undo a merge?

Yes. In the Power Query Editor, go to the Applied Steps pane on the right and click the X next to the "Merged Columns" step. This will instantly revert the table to its state before the concatenation occurred.