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

Compete to become Power BI Data Viz World Champion! First round ends August 18th. Get started.

Reply
PMSR
Frequent Visitor

How to bring two column values(text data type) in single column?

I have 3 columns A , B and C. Column A having Item IDs, Column B having Items (Item1, Item 2 and Item 3), Column C having Items ( Item 4, Item 5 and Item 6). 

How can I merge both columns B & C and make it 6 rows with respective Item ID?

1 ACCEPTED SOLUTION
Arul
Super User
Super User

@PMSR ,

I assume your data would be like the below,

 

Arul_0-1688998568135.png

 

To bring the item values from both columns to single, I select the column B and replace blank with some temporary character like the below,

 

Arul_1-1688998727467.png

 

If you look at the M code in the formula bar, you can see that "" has been replaced with text value "a".
In the next step, we will replace that with Column C for the each row by replacing "a" in the formula for each row by using each condition.

 

Arul_2-1688999024320.png

Finally, If you don't need the Column C then you can remove that one as well.

 

Arul_3-1688999106844.png

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


View solution in original post

1 REPLY 1
Arul
Super User
Super User

@PMSR ,

I assume your data would be like the below,

 

Arul_0-1688998568135.png

 

To bring the item values from both columns to single, I select the column B and replace blank with some temporary character like the below,

 

Arul_1-1688998727467.png

 

If you look at the M code in the formula bar, you can see that "" has been replaced with text value "a".
In the next step, we will replace that with Column C for the each row by replacing "a" in the formula for each row by using each condition.

 

Arul_2-1688999024320.png

Finally, If you don't need the Column C then you can remove that one as well.

 

Arul_3-1688999106844.png

Thanks,

Arul





Did I answer your question? Mark my post as a solution!

Proud to be a Super User!


LinkedIn


Helpful resources

Announcements
August Power BI Update Carousel

Power BI Monthly Update - August 2025

Check out the August 2025 Power BI update to learn about new features.

August 2025 community update carousel

Fabric Community Update - August 2025

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

Top Solution Authors