Forum Discussion

misio1023's avatar
misio1023
New Member
2 years ago
Solved

How to convert data (add date in columns)

Hi,  please help me convert the data, in the columns are months in totals and the names of people for each month (without the month in the column name), as in the screenshot     thanks a l...
  • wdx223_Daniel's avatar
    wdx223_Daniel
    2 years ago

    NewStep=Table.FromRecords(List.TransfromMany(Table.ToRecords(YourOriginalTable),each  List.Combine(List.Skip(Table.Group(Record.ToTable(_),"Name",{"n",each Table.ToRecords(Table.AddColumn(Table.Skip(_),"Month",(x)=>[Name]{0}))},0,(x,y)=>Byte.From(Text.StartsWith(y,"2023M")))[n])),(x,y)=>x[[account],[note]]&y))