Forum Discussion
Anonymous
2 years agoNot applicable
How to reference list of lists in Table.RenameColumns function?
Table.RenameColumns takes two values -- the table you want to modify, and a list (or list of lists) containing the old and new column names. Example given in Power Query documentation: Replace the...
- 2 years ago
Hi Anonymous ,
just omit the merge step and you should be good to go:let Source = Table.FromRows(Json.Document(Binary.Decompress(Binary.FromText("i45WilHyz0nxS8xNNYxRUtIBcv1Sy2HcWB0keSNUeSN0eWNUeRA3NhYA", BinaryEncoding.Base64), Compression.Deflate)), let _t = ((type nullable text) meta [Serialized.Text = true]) in type table [OldNames = _t, NewNames = _t]), #"Changed Type" = Table.TransformColumnTypes(Source,{{"OldNames", type text}, {"NewNames", type text}}), #"create list of lists" = Table.ToRows(#"Changed Type") in #"create list of lists"
By merging the columns, you are creating one string that will then become a list with just one element.
But you need a list with 2 elements in it. So omitting the merge will just solve the issue.
ImkeF
2 years agoCommunity Champion
Hi Anonymous ,
great!
So if this is solved, please mark my answer as solution. Thanks.
- Anonymous2 years agoNot applicable
I have already!:)