Search notes:

Power Query M formula language standard library: Table.CombineColumns

The following example mulitplies the values of val 1 with val 2 and stores the result in the column mult. After the operation, the columns val 1 and val 2 will be removed:
let
   tab = #table(
    { "id", "val 1", "val 2"}, {
     {  1 ,      6 ,      4 },
     {  2 ,      2 ,      3 },
     {  3 ,      3 ,      5 }
   }),
   tab_ = Table.CombineColumns(tab,
     {"val 1", "val 2"},
      each _{0} * _{1},
     "mult"
   )
in
   tab_
The result is
   id   mult
   1    24
   2    6
   3    15

See also

The Power Query standard library and its function Table.AddColumn

Index