Forum Discussion
aoliver
7 years agoHelper III
Conditional Renamed Columns
Hi everyone It is possible to change the name of a column in powerQuery depending of the previous name? I am trying it in advance editor but I cant reach a solution of this, an example would be ve...
PattemManohar
7 years agoCommunity Champion
aoliver Could you please provide an example to understand exactly about your requirement.
aoliver
7 years agoHelper III
let
Source = Table.Combine({#"tempAmb(DateStart)",#"tempAmb(DateEnd)"}),
- Here, i want to check if there is a column with the name:"firstName"
#"Renamed Columns" = Table.RenameColumns(Source,{{"firstName", "secondName"}})
in
#"Renamed Columns"
So, if the query has a column called "firstName" it will be call "secondName" at the end.
I'll hope that this example would be enough to understand the problem, if not, I can write pseudocode PattemManohar
Thanks