I have 2 columns - A and B. I would like values in column B to be replaced by values in column A. Can this be done?
I have 2 columns - A and B. I would like values in column B to be replaced by values in column A. Can this be done?
Hi,
Why can't you just duplicate column A and then delete column B?
If that's not what you want, suggest you include more information.
Regards
I want the heading for column B to remain the same.
I have about 20 columns and I want their values to follow column A. Once the values are copied over, I will unpivot these 20 columns, hence the need to maintain the column headings.
Edit: I have figured out the solution I'll just unpivot the 20 columns; a new column "Value" will be auto-created in this process. I just need to delete this and use column A as the new "Value" column.
Still curious though, if there's a way to copy values across columns whilst maintaining heading names. Assuming I don't need to unpivot anymore...
Last edited by meileetan; 11-24-2021 at 02:04 AM.
You can do it with:
= Table.ReplaceValue(#"Previous Step", each [Column2], each [Column1], Replacer.ReplaceValue, {"Column2"})
though I doubt this is very efficient.
Obviously amend the previous step name as well as the column references as required.
Regards
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks