Forum Discussion
cgkas
Helper V
7 years agoRename all column headers removing part before to separator
Hello to all, I have a table with headers of the form Table.text1.text2.text3:HeaderName1 Table.text1.text2.text3.text4.text5:HeaderName2 Table.text1.text2:HeaderName3 I´d like to remane a...
- 7 years ago
Thanks for your help and time Maggi v-juanli-msft and mussaenda ,
I found the solution combining Text.AfterDelimiter() with List.Zip() and List.Transform in a single command like below, maybe could help someone in the future.
let Source = Excel.CurrentWorkbook(){[Name="Table1"]}[Content], RenameColumns = Table.RenameColumns( Source, List.Zip(
{
Table.ColumnNames( Source ),
List.Transform(Table.ColumnNames( Source ), each Text.AfterDelimiter( _, ":") )
} ) ) in RenameColumnsRegards
mussaenda
Community Champion
7 years agoHi, can you share sample data?