Forum Discussion
nelsonwhyu
6 years agoFrequent Visitor
Concatenate Dynamic COlumn
Hi, I am trying to create a new Column "Key" by concatenating every column with header starting with "Level ". However, number of Levels are dynamic and varies across my source files. Lev...
- 6 years ago
= Table.AddColumn(Source, "Key2", each Text.Combine( List.Transform(Level_List, (col) => Record.Field(_, col)), "__") )
artemus
Microsoft Employee
6 years ago= Table.AddColumn(Source, "Key2", each Text.Combine( List.Transform(Level_List, (col) => Record.Field(_, col)), "__") )nelsonwhyu
6 years agoFrequent Visitor
Thanks artemus ! This works like magic
- artemus6 years ago
Microsoft Employee
Glad it works for you.
Is there some part of this formula that you don't understand?
- nelsonwhyu6 years agoFrequent Visitor
artemus , thanks it's very helpful. The formula all makes sense.
I think I just need to get more fluent in the usage/meaning of "each" and "_" notation