Forum Discussion
mariopavic
6 years agoFrequent Visitor
Dynamic column expand
Hi all, I want to expand records column dinamically. Here is the code: toExpand = Table.ExpandRecordColumn(#"Table to expand", "newColumn name", ListOfNamesToExpand) // ListOfRecords cont...
- 6 years ago
I didn't compare old vs new code but new one is way faster:
convertToList= Record.FieldNames(Record.Combine(List.Select(Table.Column(#"Removed Other Columns","newColumnName"), each _ <> "" and _ <> null))), ListOfNamesToExpand = Table.ExpandRecordColumn( #"Removed Other Columns","newColumnName", convertToList),The problem was in creating the actual list.
mariopavic
6 years agoFrequent Visitor
I didn't compare old vs new code but new one is way faster:
convertToList= Record.FieldNames(Record.Combine(List.Select(Table.Column(#"Removed Other Columns","newColumnName"), each _ <> "" and _ <> null))),
ListOfNamesToExpand = Table.ExpandRecordColumn( #"Removed Other Columns","newColumnName", convertToList),The problem was in creating the actual list.