Forum Discussion

k-k-k-k's avatar
k-k-k-k
Frequent Visitor
4 years ago
Solved

Power Query M , multiple sheet combine, add sheet name as new column to each corresponding table

hi experts,   i have action is combine 10+ sheet table in one Excel, the sheet name is contain "year" info, like the sheet name is "2018". but in the table of sheet is not have year column.   so i ...
  • wdx223_Daniel's avatar
    4 years ago

    NewStep=#table(Table.ColumnNames(PreviousStepName),Table.ToList(PreviousStepName,each {_{0},Table.AddColumn(_{1},"Year",(x)=>_{0})}))