cancel
Showing results for 
Search instead for 
Did you mean: 
Reply
FalkoKoehler
New Member

merge two columns of one table in a new table

Hi All,

 

i am looking for a way to merge two columns of one table in a new table for the following example:

 

Table:

ID     Employees Dpt1     Employees Dpt2

543        12                                 11

323         4                                  22

 

New table should be:

ID          Dpt         Employees

543       Dpt1              12

543       Dpt2              11

323       Dpt1              4

323       Dpt2              22

 

Thanks a lot for your help :)!

Regards

1 ACCEPTED SOLUTION

Accepted Solutions
Abduvali Skilled Sharer
Skilled Sharer

Re: merge two columns of one table in a new table

Go back to Edit mode and instead of using Summarize try using Duplicate Table and perform all transformations within that duplicate table. 

 

That might do the trick for you.

View solution in original post

5 REPLIES 5
Abduvali Skilled Sharer
Skilled Sharer

Re: merge two columns of one table in a new table

Hi @FalkoKoehler,

 

You need to use Unpivot function in power bi edit query mode:

 

Capture16.PNGHighlight two columns and click right button on your mouse, and select Unpivot columnsCapture17.PNGResult

 

Regards

Abduvali

FalkoKoehler
New Member

Re: merge two columns of one table in a new table

Hi @Abduvali,

 

thanks for your reply. My source table needs to hav unique IDs so I cannot unpivot directly in the source table. So what i did is to create a new table with the summarize function (only leaving the relevant columns). The problem now is that the query moder is only available for imported/connected tables but not when they are created inside Power BI it seems - so i cannot find a way to unpivot this? 😞

 

Do you got a solution for this?

Abduvali Skilled Sharer
Skilled Sharer

Re: merge two columns of one table in a new table

Go back to Edit mode and instead of using Summarize try using Duplicate Table and perform all transformations within that duplicate table. 

 

That might do the trick for you.

View solution in original post

FalkoKoehler
New Member

Re: merge two columns of one table in a new table

@Abduvaliyou were too fast i was just about to declare it as resolved as i got exactly you solution a second ago 😄

Highlighted
Abduvali Skilled Sharer
Skilled Sharer

Re: merge two columns of one table in a new table

@FalkoKoehler well-done mate!

Helpful resources

Announcements
New Ranks Launched March 24th!

New Ranks Launched March 24th!

The time has come: We are finally able to share more details on the brand-new ranks coming to the Power BI Community!

‘Better Together’ Contest Finalists Announced!

‘Better Together’ Contest Finalists Announced!

Congrats to the finalists of our ‘Better Together’-themed T-shirt design contest! Click for the top entries.

Arun 'Triple A' Event Video, Q&A, and Slides

Arun 'Triple A' Event Video, Q&A, and Slides

Missed the Arun 'Triple A' event or want to revisit it? We've got you covered! Check out the video, Q&A, and slides now.

Join THE global Microsoft Power Platform event series.

Join THE global Power Platform event series.

Attend for two days of expert-led learning and innovation on topics like AI and Analytics, powered by Dynamic Communities.

Community Summit North America

Community Summit North America

Innovate, Collaborate, Grow. The top training and networking event across the globe for Microsoft Business Applications

Top Solution Authors
Top Kudoed Authors