Forum Discussion
ViorelCa
Helper I
8 years agoPower Query - Extract an Existing Column Name and put it in a new Custom Column
Dear Colleagues, I did not find a solution for a simple problem: Create a new custom column whose only content should be the name of an existing column in that Table. Many thanks! Viorel...
- Anonymous8 years ago
OK in that case your custom column's formula should be
= List.First(Table.ColumnNames(#"Insert Previous Step Here"))
...for whatever the previous step was. I'm going to guess it's #"Renamed Columns" or #"Changed Type" or something like that.
ViorelCa
Helper I
8 years agoIt is always the first column, and after I get its name (the name of the Brand) I will change it with the proper name (P&L Category), therefore in the new Custom Column I have to remain with the name of the Brand.
Anonymous
8 years agoNot applicable
OK in that case your custom column's formula should be
= List.First(Table.ColumnNames(#"Insert Previous Step Here"))
...for whatever the previous step was. I'm going to guess it's #"Renamed Columns" or #"Changed Type" or something like that.
- ViorelCa8 years ago
Helper I
Many thanks, Anonymous , it works like a charm!
I remain indebted to you!
Kind regards,
Viorel