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
Natasha93
Frequent Visitor

How To Combine Two Columns Into One Column

Hi all! I'll start of by saying I'm new to Power BI, my skills are at a beginner level...

 

I have a table with two different columns, "Service" and "Configuration Item."

An Example:

ServiceConfiguration Item
1A
2B
3C
4D
5E

 

I would like to combine the two columns into one new column so it looks like this (there may be duplicates, which would need to be removed):

Service and CI
1
2
3
4
5
A
B
C
D

 

After some Googling, I can only find information on "merging columns," but the results are not what I need. For example:

Incorrect Result
1 A
2 B
3 C
4 D
5 E

 

Is there a DAX command for this?

1 ACCEPTED SOLUTION
v-stephen-msft
Community Support
Community Support

Hi @Natasha93 ,

 

It seems to be easy to achieve.

Please try what I do below.

Select two columns at the same time, and then click 'Unpivot Columns'.

vstephenmsft_0-1658221248536.png

You'll get the column you want.

vstephenmsft_1-1658221301832.png

Rename the Value column and remove the Attribute column. Below is the result.

vstephenmsft_3-1658221397069.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

View solution in original post

4 REPLIES 4
v-stephen-msft
Community Support
Community Support

Hi @Natasha93 ,

 

It seems to be easy to achieve.

Please try what I do below.

Select two columns at the same time, and then click 'Unpivot Columns'.

vstephenmsft_0-1658221248536.png

You'll get the column you want.

vstephenmsft_1-1658221301832.png

Rename the Value column and remove the Attribute column. Below is the result.

vstephenmsft_3-1658221397069.png

 

 

 

Best Regards,

Stephen Tao

 

If this post helps, then please consider Accept it as the solution to help the other members find it more quickly.

Hi @v-stephen-msft .  Thank you so much for the genius simplicity of your solution!  Much gratitude.

amitchandak
Super User
Super User

@Natasha93 , In a new blank query create this list and return it

List.Combine(Table[Service], Table[Configuration Item])

 

refer video if needed - https://youtu.be/yySRoH51Sb0

Hi thanks, but I don't understand. I'm a beginner and can't work out how to list that command and your video is difficult to follow.

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.