Forum Discussion
Anonymous
3 years agoNot applicable
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
1 Reply
- amitchandak
Super User
Anonymous , 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