Forum Discussion
Power 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.
15 Replies
- AnonymousNot applicable
Which column name? Short of you typing in the name of the column, how is the query supposed to determine which column's name to use?
- radoslaw85Regular Visitor
Hi there,
im looking for something similiar,
I will be creating multilanguage solution in power query, so im looking for API's
For API's I got what I need, but im strugling to get Current Column Name.
Imagine 4 columns: pl, it, es, fr.
Now I would need a "simple" function that would retrive column name of the column it resides in. i.e
if my formula resides in column name pl, it would retrive its name which is pl
if my formula resides in column name es, it would retrive its name which is es
Can some1 help?