Forum Discussion

royces99's avatar
royces99
Frequent Visitor
3 years ago
Solved

Add columns based off today's date and previous 3 months

I'm trying to add columns to a table with the column names being today's date and the previous 3 months (last day of month).  The code below is free of syntax errors but the last row of code shown ge...
  • AlienSx's avatar
    3 years ago

    royces99 replace last 2 steps with the following

    databaseWithColumns = 
       List.Accumulate(
          column_names, 
          Source, 
          (s, c) => Table.AddColumn(s, c & " Column", each null, Int64.Type)
       )