Forum Discussion
DanFromMontreal
Helper IV
4 years agoReordering column using a use define table
Hello dear Power query community, When I'm importing data from a CSV file and my 6 column header name are sequenced as shown in E3:J3 My final output should be like E5:J5 I have rearrange my colu...
- 4 years ago
Yes, that column is redundant. Use this.
= Table.ReorderColumns(Source,List.Select(tblHeaderSequence[Header], (i)=> List.Contains(Table.ColumnNames(Source),i))&List.Difference(Table.ColumnNames(Source),tblHeaderSequence[Header])) - 4 years ago
Great stuff.
Simple and to the point.
Many thanks
Vijay_A_Verma
Most Valuable Professional
4 years agoYes, that column is redundant. Use this.
= Table.ReorderColumns(Source,List.Select(tblHeaderSequence[Header], (i)=> List.Contains(Table.ColumnNames(Source),i))&List.Difference(Table.ColumnNames(Source),tblHeaderSequence[Header]))
DanFromMontreal
Helper IV
4 years agoGreat stuff.
Simple and to the point.
Many thanks