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

Find everything you need to get certified on Fabric—skills challenges, live sessions, exam prep, role guidance, and more. Get started

Reply
pigsinblankets
Advocate I
Advocate I

Combining two data columns into one in Power Query

Good Afternoon,

 

I have two text columns that I'm looking to combine into one column - not merged together I want them pulled together by a unique ID which combines the two columns into one. 

 

Basically I have data pulling from two separate sources which is pulling in the same information (priority) and am looking to combine this priority column so I can filter by that priority for the combined data table with data from both systems - is there a simple way for combining two text columns in this way? 

 

Apologies brain a bit slow on a Monday! 

1 ACCEPTED SOLUTION
Analystmate
Helper II
Helper II

@pigsinblankets 

Try this.

SS1.
(SS1) Select both columns> (SS2) Goto Tranform tab > Click on Unpivot Column > (SS.3) Remove the empty form value field. > SS 4 ( Result )

Analystmate_0-1667904056070.png

SS.2

Analystmate_2-1667904170377.png

SS.3

Analystmate_3-1667904353527.png

SS.4

Analystmate_4-1667904415908.png

 

View solution in original post

7 REPLIES 7
pigsinblankets
Advocate I
Advocate I

Thank you all for your responses @vanessafvg @v-yueyunzh-msft @Analystmate it's much appreciated I have got this working now using the unpivot columns method 🙂 

Analystmate
Helper II
Helper II

@pigsinblankets 

Try this.

SS1.
(SS1) Select both columns> (SS2) Goto Tranform tab > Click on Unpivot Column > (SS.3) Remove the empty form value field. > SS 4 ( Result )

Analystmate_0-1667904056070.png

SS.2

Analystmate_2-1667904170377.png

SS.3

Analystmate_3-1667904353527.png

SS.4

Analystmate_4-1667904415908.png

 

this worked like a charm for me too.  Thanks!

v-yueyunzh-msft
Community Support
Community Support

Hi , @pigsinblankets 

According to your description, you want to merge two Text columns to one in Power Query Editor.Right?

You can select your two column , and click "Merge Columns" in "Add Column":

vyueyunzhmsft_0-1667872698384.png

Then you can add Separator to the Merged Column:

vyueyunzhmsft_1-1667872734902.png

 

For more information, you can refer to :
4 Easy Steps to Concatenate Columns in Power Query (yodalearning.com)

 

If this method does not meet your needs, you can provide us with your special sample data and the desired output sample data in the form of tables, so that we can better help you solve the problem.

 

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

vanessafvg
Super User
Super User

please provide data to support what you are saying. its much easier to provide a solution with an example of the data in text format.

1. provide sample data

2. example of expected solution





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




@v-yueyunzh-msft @vanessafvg 

 

Thank you both for your responses.

 

I have some sample data below, I am looking to combine the priorities into one column so I can filter by priority for all projects if this is possible, the projects are reported from different systems/data sources - 

ProjectData Source 1Data Source 2
1Priority 1 
2Priority 2 
3Priority 3 
4Priority 4 
5 Priority 1
6 Priority 2
7 Priority 3
8 Priority 4
9 Priority 1
10 Priority 2 

so basically you are saying that you want to combine these, but there will only ever be one value in each column correct?

 

you can add a conditional column in power query see attach

 

vanessafvg_0-1667906498409.png

 





If I took the time to answer your question and I came up with a solution, please mark my post as a solution and /or give kudos freely for the effort 🙂 Thank you!

Proud to be a Super User!




Helpful resources

Announcements
Sept PBI Carousel

Power BI Monthly Update - September 2024

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

September Hackathon Carousel

Microsoft Fabric & AI Learning Hackathon

Learn from experts, get hands-on experience, and win awesome prizes.

Sept NL Carousel

Fabric Community Update - September 2024

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

Top Solution Authors