Smart Systems for Home

Plain how-to guides for smart home, security and home Wi-Fi

Power Query Combine Columns: Step-by-Step Guide

· 6 min read · Home Tech

In this article
  1. What You'll Need
  2. Step-by-Step
  3. Common Mistakes
  4. Tips
  5. Troubleshooting
  6. Frequently Asked Questions

To combine columns in Power Query, select the columns you want to merge (Ctrl+click for non-adjacent ones), then go to the Transform tab (or Add Column tab) and click Merge Columns. Choose a separator such as a space, comma, or custom character, give the new column a name, and click OK. Power Query creates a new column containing the joined values and leaves the originals in place if you use Add Column; using Transform replaces them. That is the whole operation—the rest of this guide covers doing it cleanly, handling data types, and fixing the problems that come up.

What You'll Need

  • Power Query available in Excel (Data tab > Get & Transform Data) or Power BI Desktop (Home > Transform data). The steps are the same in both; menu labels can differ slightly by version, device, or region.
  • A table or range loaded into Power Query with at least two columns you want to join.
  • Text columns for the simplest results. If a column is numeric or a date, convert it to text first (right-click the column header > Change Type > Text) so the merge does not fail or produce errors.

Step-by-Step

  1. Load your data into Power Query. In Excel, select your table and go to Data > From Table/Range. In Power BI, use Home > Transform data to open the Power Query Editor on an existing query. Confirm the columns you need are visible in the preview.
  2. Check the data types. Look at the small icon in each column header. If either column you plan to merge is a number, date, or logical type, right-click the header and choose Change Type > Text. Merging mixed types is the most common source of errors.
  3. Select the columns to merge. Click the first column header, then Ctrl+click each additional column. The order you click determines the order of the values in the result, so click left-to-right if you want the natural reading order. For adjacent columns, click the first and Shift+click the last.
  4. Choose Merge Columns. On the Transform tab, click the Merge Columns button. If you want to keep the original columns, use the Add Column tab instead and click Merge Columns there—this creates the new column without removing the sources.
  5. Pick a separator. In the Merge Columns dialog, choose from the dropdown: space, comma, semicolon, colon, equals, or Custom. Use Custom for anything else, such as a hyphen or a slash. If you want no separator at all (for example joining first and last name into one word), choose None.
  6. Name the new column. Type a clear name in the New column name box. Avoid names that already exist in the query; Power Query will append a number, which makes later steps confusing.
  7. Click OK and review. The preview updates immediately. Scroll through the new column to confirm values joined correctly and that no nulls or errors appeared.
  8. Handle nulls if needed. If a source cell was blank, the merge may produce a leading, trailing, or doubled separator. Use Transform > Replace Values to clean up, or add a step that trims the result (right-click the column > Transform > Trim).
  9. Rename and reorder. Double-click the new column header to rename it, and drag it to the position you want. Then close and load (Home > Close & Load) in Excel, or Home > Close & Apply in Power BI.

Common Mistakes

  • Merging without converting to text. Numbers and dates merge inconsistently or throw errors. Convert first.
  • Using Transform instead of Add Column when you need the originals. Transform removes the source columns; if you later need them, you must re-add them from the source data.
  • Choosing the wrong separator. A comma with no following space produces "Smith,John" instead of "Smith, John". Use Custom and type a comma plus a space if you want both.
  • Ignoring nulls. Blank cells can leave stray separators. Check the result and clean with Replace Values or Trim.
  • Forgetting that step order matters. If you merge before filtering or cleaning, you may merge rows you later remove—wasted work and confusing steps in the Applied Steps list.
  • Merging columns that contain different delimiters. If one column already contains commas, joining with a comma makes the result ambiguous for later splitting. Choose a separator that does not appear in the data.

Tips

  • Use Add Column > Merge Columns whenever you might need the originals for filtering, sorting, or a later merge. It costs nothing and keeps the query flexible.
  • For conditional joins—such as only combining when both cells are filled—add a Custom Column with an if statement instead of a straight merge. The formula bar accepts M code like if [First] <> null and [Last] <> null then [First] & " " & [Last] else null.
  • Use the ampersand operator in a Custom Column for full control over separators and null handling; Merge Columns is just a shortcut for the same idea.
  • Name the merged column before you close and load. Renaming later in the worksheet does not change the query.
  • Keep the Applied Steps list tidy: delete or rename steps you no longer need so the query stays readable.
  • If you merge the same columns repeatedly across queries, consider creating a function or a reference query rather than repeating the steps.

Troubleshooting

The Merge Columns button is greyed out. You likely have no columns selected, or you selected a column that cannot be merged (such as a structured column or a table column). Select two or more plain columns and try again.

Errors appear in the new column. Check the data types of the source columns. Convert them to Text, then refresh the query. If errors persist, look at the specific rows flagged—often a cell contains an unexpected value or a nested table.

The separator appears twice or at the start/end. A source cell was blank. Use Replace Values to collapse double separators, or add a Trim step. For full control, replace the merge step with a Custom Column formula that checks for nulls.

The original columns disappeared. You used Transform > Merge Columns. Either undo the step (delete it from Applied Steps) and redo with Add Column, or re-add the source columns from the original data.

The merge worked in the preview but not after loading. Refresh the query and check for type changes applied later in the steps. A step after the merge may be converting the new column back to a number, which fails on text values.

If that did not work, start over with a fresh query from the same source and apply only the merge step. This isolates whether an earlier step is causing the problem. Avoid deleting the query itself until you have saved a copy, since that removes your work.

Frequently Asked Questions

Does merging columns delete the original columns?

Only if you use Transform > Merge Columns. Add Column > Merge Columns keeps the originals and adds the new column alongside them.

Can I merge more than two columns at once?

Yes. Ctrl+click as many columns as you need, then use Merge Columns. The values are joined in the order you selected them.

How do I combine columns with no separator?

In the Merge Columns dialog, choose None from the separator dropdown. The values are concatenated directly, such as "AB" from "A" and "B".

Why does my merged column show errors?

Almost always a data type mismatch. Convert the source columns to Text before merging, then refresh.

Can I merge columns conditionally?

Yes, with a Custom Column and an if statement. This lets you skip blanks or apply different separators depending on the row.

Do these steps work in both Excel and Power BI?

Yes. The Power Query Editor is the same engine in both; only the surrounding menus differ. Labels may vary slightly by version and region.