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

Earn the coveted Fabric Analytics Engineer certification. 100% off your exam for a limited time only!

Reply
ARomain
Helper I
Helper I

Combine 2 Columns and Keep User ID

I am having some issues trying to pivot and unpivot and getting confused.

 

I have hire, fire, re-hire and re-fire dates and I want to combine the hires and fires into one column and simply duplicate the ID

 

ARomain_0-1684336551210.png

 

1 REPLY 1
amitchandak
Super User
Super User

@ARomain , Assume your table name is Table 1

 

Try this in a new blank query in power query

 

let

source = Table.Combine({
Table.SelectColumns(Table1,{"Name", "Hire", "Fire"}),

Table.RenameColumns(
Table.SelectColumns(Table1,{"Name", "Re-Hire", "Re-Fire"}),
{{"Re-Hire", "Hire"},{"Re-Fire", "Fire"}}
)
)

in

source

Helpful resources

Announcements
April AMA free

Microsoft Fabric AMA Livestream

Join us Tuesday, April 09, 9:00 – 10:00 AM PST for a live, expert-led Q&A session on all things Microsoft Fabric!

March Fabric Community Update

Fabric Community Update - March 2024

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