Hello and welcome to the next lesson in our workshop series.
In our previous session, we focused on breaking data apart by splitting a single column into multiple columns. This is a critical skill for unlocking the details hidden within condensed data fields. Now, we're going to tackle the logical reverse: merging multiple columns into a single column.
Just as splitting columns helps in detailed analysis, merging them is essential for creating meaningful labels, unique identifiers, or consolidated text for reports. For example, your workshop participants might need to combine a First Name and Last Name column to create a Full Name for a report, or merge City, State, and Zip columns to create a Full Address.
By the end of this lesson, you will be able to teach managers the easiest and most reliable ways to combine columns in Power Query, ensuring they can structure their data perfectly for final analysis and visualization.
Why Merge Columns? The Business Case for Managers
For your audience, combining columns is about creating clarity and utility. Here are some key scenarios you can present to them:
- Creating Display Labels: Combining a first and last name into a single "Full Name" column is much cleaner for charts and tables than displaying two separate columns.
- Generating Unique IDs: Merging a
Product Category(e.g., "SKT") with aProduct Number(e.g., "1045") can create a uniqueSKUlike "SKT-1045". - Constructing Full Addresses: For mapping or mailing lists, combining
Street,City, andStateinto a singleAddresscolumn is often necessary.
The goal is to consolidate information into a single, more useful field.

The Easiest Way: The 'Merge Columns' Feature
For your audience of managers, the most important method to teach is the built-in Merge Columns feature. It's a simple, no-code graphical interface that handles all the complexities automatically.
You can find this feature in two main places on the Power Query ribbon:
- Add Column Tab: This creates a new merged column while keeping the original columns. This is the recommended approach as it's non-destructive.
- Transform Tab: This replaces the selected columns with the new merged column.
The official Microsoft documentation provides a clear, step-by-step guide for both approaches. It's a great resource to have on hand.
Skim through the sections explaining how to merge columns from the 'Transform' tab and how to achieve the same result by creating a 'Custom Column' via the 'Add Column' tab. Notice the recommendation to create a new column to avoid potential errors.
The process is straightforward:
- Hold
CTRLand select the columns you want to merge in the order you want them to appear. - Go to the Add Column tab and click Merge Columns.
- In the dialog box, choose a separator (like a space, comma, or a custom character).
- Give your new column a meaningful name.

One of the biggest advantages of this feature—and a key point to emphasize to your managers—is that it automatically handles columns with different data types (like text and numbers). Power Query intelligently converts everything to text before merging, preventing errors.
Concatenate values in Power Query M | Avoid these pitfalls!
This video from BI Gorilla demonstrates just how easy the 'Merge Columns' button is to use and highlights its power.
Watch the segment from 07:07 to 08:05. The presenter shows how to use the 'Merge Columns' feature from the 'Add Column' tab. Notice how it effortlessly combines a numeric 'ID' column and a text 'Description' column, with Power Query generating the correct formula in the background.
Understanding the Pitfalls: Why the UI Method is Best
To help you answer potential "what if" questions from your workshop, it's useful to understand the manual methods of merging and the problems they can cause. This context will reinforce why the simple "Merge Columns" button is the recommended practice.
Manual Method 1: The Ampersand (&) Operator
Just like in Excel, you can use the & operator in a Custom Column to join text. The formula would look something like [FirstName] & " " & [LastName].
However, this method has two major pitfalls:
- Data Type Mismatch: It only works on text. If you try to merge a text column with a number column, you will get an error.
- Handling of Nulls: If any part of the concatenation involves a
nullvalue, the entire result for that row might becomenull.
Advanced Concatenate/ Merge columns with Power Query
The video from Curbal provides a perfect demonstration of these pitfalls. It clearly shows the error that occurs when mixing data types and the unexpected result when encountering nulls.
Watch from 01:04 to 03:56. Pay close attention to: The error message when trying to combine text and numbers directly (01:04 - 01:54). The explanation of how the 'Merge Columns' UI feature automatically converts types behind the scenes (01:54 - 02:28). The issue where concatenating with a null value results in a null output (02:28 - 03:56).
To fix the data type error manually, you'd need to wrap non-text columns in a function like Text.From(), e.g., Text.From([ID]) & " - " & [Description]. But as the video shows, this doesn't solve the null issue. This is why the UI button is superior—it handles both issues for you.
Manual Method 2: The Text.Combine() Function
The Text.Combine() function is what Power Query uses behind the scenes. It's more robust and efficient, especially for merging many columns.
The syntax is: Text.Combine({[Column1], [Column2], ...}, "separator")
The curly braces {} create a list of the columns to be combined.
Concatenate values in Power Query M | Avoid these pitfalls!
Let's return to the BI Gorilla video, which introduces Text.Combine as a more efficient alternative to stringing together many columns with the ampersand operator.
Watch from 01:44 to 03:36. This segment explains the syntax of Text.Combine and shows how it can easily merge three address columns with a consistent separator, which is much cleaner than multiple & operators.
While Text.Combine is more powerful, the key takeaway for your workshop is that the Merge Columns button provides the simplest and safest way for managers to achieve their goal without needing to worry about functions or formulas.
Pro-Tip: Merging and Formatting Dates
A common scenario is merging text with a date, for example, creating a label like "Report for: 2023-10-26". Simply converting a date to text might result in an undesirable format. Power Query provides a specific function for this: Date.ToText().
This function allows you to specify a format string to display the date exactly how you want it. For example, using a format of "dd-MMM-yyyy" would produce "26-Oct-2023".
This is an advanced tip you can offer to managers who are more comfortable or have specific formatting needs.
Test your understanding!
A manager has a table with an EmployeeID (Number type) and HireDate (Date type). They want to create a new column called OnboardingID with the format "EMP-101-2024", where 101 is the EmployeeID and 2024 is the year of the HireDate.
What is the easiest, most reliable way you would teach them to do this in Power Query?
Show answer
The most reliable, multi-step process using the UI would be:
- Extract the Year: Select the
HireDatecolumn. Go to the Add Column tab -> Date -> Year -> Year. This creates a new column with just the year (e.g., 2024). Let's call itHire Year. - Merge Columns: Select the
EmployeeIDcolumn, then theHire Yearcolumn (in that order). Go to the Add Column tab -> Merge Columns. - Configure the Merge:
- Choose a hyphen (
-) as the separator. - Name the new column
TempID. - This will create a column like "101-2024".
- Choose a hyphen (
- Add a Prefix: Select the new
TempIDcolumn. Go to the Transform tab -> Format -> Add Prefix. Enter "EMP-" as the prefix. - Rename: Rename the final column to
OnboardingID.
This approach uses only UI features, making it accessible and repeatable for managers. It correctly handles the number-to-text conversion and date extraction without requiring manual formulas.
Conclusion
You are now equipped to teach your workshop participants how to effectively combine data from multiple columns into one. This skill, paired with splitting columns, gives them comprehensive control over the structure of their data.
Key Takeaways for Your Workshop:
- Merging columns is useful for creating unique IDs, full names, and complete addresses for reporting and visualization.
- The Merge Columns button on the Add Column tab is the easiest and most recommended method.
- This UI-driven feature automatically handles different data types (like numbers and text), preventing common errors.
- Always advise creating a new merged column rather than replacing the originals to preserve the raw data.
Preview of the Next Lesson:
So far, we've focused on cleaning and structuring individual rows and columns. In our next lesson, we will move from preparing data to analyzing it. We will cover how to group and aggregate data to create summaries. This is where we start turning clean, granular data into high-level business insights, like calculating total sales per region or finding the average transaction value per customer.