Skip to main content
cancel
Showing results for 
Search instead for 
Did you mean: 

Register now to learn Fabric in free live sessions led by the best Microsoft experts. From Apr 16 to May 9, in English and Spanish.

Reply
dsabsi
Advocate I
Advocate I

How to add 2 text columns into one column

Hi guys, 

 

I have 2 columns with text values, which I want to add together into 1 column. 

Therefore, I think I need a formula but I can't find it on the forumn. 

 

 

The first column contains the first names and the second column the surnames. 

For example, first column contains a name: John and the second column is its surname: Perrow

I want to add the first name first and then the second name, so it becomes John Perrow. 

 

Could anyone please help? 

 

Best regards, 

DSabsi

 

 

1 ACCEPTED SOLUTION

Option "Merge Columns" is also available on the "Add Column" tab, in which case the original columns will be kept and a new column will be added with the merged values.

Specializing in Power Query Formula Language (M)

View solution in original post

6 REPLIES 6
Interkoubess
Solution Sage
Solution Sage

Hi @dsabsi,

 

You can create another column and use the function Concatenate as below ( you can add a spaceas you want):Concat.PNG

 

You can also use power query to do that.

I hope it helps,

 

Thx.

Hi Guys, 

 

I tried both your solutions, and they are almost perfect. 

@Interkoubess, how do you add space between the two tables, so that it becomes a1 b1? 

@MarcelBeug, is there also another possibility except for merging, so that i can keep column A(first name) and column B(sur name)? Because with merging, I will lose those 2 tables but the result is very nice!

 

Many thanks for both of your replies!!!

 

I look forward to your solutions. 

 

Cheers, 

 

DSabsi

Option "Merge Columns" is also available on the "Add Column" tab, in which case the original columns will be kept and a new column will be added with the merged values.

Specializing in Power Query Formula Language (M)

Hi @MarcelBeug,

Is it possible to merge 2 columns in Measures? We use live connection and I do not have rights to change anything in the data model. I want to concatenate 3 columns and show them in one in matrix or table visual. Any help will be appreciated.

 

regards

tanuj

@MarcelBeug, thank you very much, I used your solution and it works perfectly!! 

In the Query Editor, select both columns, go to the "Transform" tab, choose "Merge Columns" and fill out the fields in the popup screen:

 

Merge columns.png

Specializing in Power Query Formula Language (M)

Helpful resources

Announcements
Microsoft Fabric Learn Together

Microsoft Fabric Learn Together

Covering the world! 9:00-10:30 AM Sydney, 4:00-5:30 PM CET (Paris/Berlin), 7:00-8:30 PM Mexico City

PBI_APRIL_CAROUSEL1

Power BI Monthly Update - April 2024

Check out the April 2024 Power BI update to learn about new features.

April Fabric Community Update

Fabric Community Update - April 2024

Find out what's new and trending in the Fabric Community.