Forum Discussion

ngct1112's avatar
ngct1112
Post Patron
4 years ago
Solved

Re-order column

Hi All, I am working on the data set in SQL which may change regularly. I would like to keep 2 columns always at the begining and doesn't matter for the rest. 1. "ID" 2. "Item"   is there any wa...
  • wdx223_Daniel's avatar
    4 years ago

    =let col=Table.ColumnNames(PreviousStep) in Table.ReorderColumns(PreviousStep,List.Sort(col,{{each List.PositionOf({"Item","ID"},_),1},each List.PositionOf(col,_)}))