cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
Jyo27
Helper I
Helper I

Concatenate

Hi Everyone , 

I need to concatenate two columns . Please help how can I achieve the expected output.

 

Daycustom
1Day
2Day
3Day
4Day

 

Expected Result:

Day
Day 1
Day 2
Day 3
Day 4
1 ACCEPTED SOLUTION
v-yueyunzh-msft
Community Support
Community Support

Hi , @Jyo27 

For your need , here are two ways in Power Query Editor and Power Bi Desktop.

(1)If you do not need the raw columns, you can do it in Power Query Editor(click "Transform data" 😞

You can select two columns and then click the "Merge Columns" in the "Transform" tab.

vyueyunzhmsft_0-1669948078468.png

Then you can enter like this and we can meet your need:

vyueyunzhmsft_1-1669948135588.png

 

(2)If you need to keep two columns and use it in Power BI Desktop , we can use dax to meet your need.

We can go to this table , and click "New Column" and enter this:

Column = [custom] & " " & [Day]

Then we can meet your need:

vyueyunzhmsft_2-1669948234932.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

2 REPLIES 2
v-yueyunzh-msft
Community Support
Community Support

Hi , @Jyo27 

For your need , here are two ways in Power Query Editor and Power Bi Desktop.

(1)If you do not need the raw columns, you can do it in Power Query Editor(click "Transform data" 😞

You can select two columns and then click the "Merge Columns" in the "Transform" tab.

vyueyunzhmsft_0-1669948078468.png

Then you can enter like this and we can meet your need:

vyueyunzhmsft_1-1669948135588.png

 

(2)If you need to keep two columns and use it in Power BI Desktop , we can use dax to meet your need.

We can go to this table , and click "New Column" and enter this:

Column = [custom] & " " & [Day]

Then we can meet your need:

vyueyunzhmsft_2-1669948234932.png

Thank you for your time and sharing, and thank you for your support and understanding of PowerBI! 

 

Best Regards,

Aniya Zhang

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

vicky_
Solution Supplier
Solution Supplier

You can try to go back into Power Query > Add Column > Merge Columns.
If your Day is a number type, you may need to edit the formula so that it is a text value.

vicky__0-1669932864306.png

This should give you a merged column with the Day + Day Number. You can delete the two columns if you don't need them anymore.

Helpful resources

Announcements
Carousel_PBI_Wave1

2023 Release Wave 1 Plans

Power BI release plans for 2023 release wave 1 describes all new features releasing from April 2023 through September 2023.

Power BI Dev Camp Session 30

Ted's Dev Camp - January 26, 2023

This session will provide guidance and teach campers the skills required to build Power BI reports that support multiple languages.

Power BI Summit Carousel 2

Global Power BI Training

Make sure you register today for the Power BI Summit 2023. Don't miss all of the great sessions and speakers!

Thank you 2022 Review

2022 Monthly Feature Releases

We had a great 2022 with a ton of feature releases to help you drive a data culture.