M-query multiply pairs of columns

20 Views Asked by At

I have data with the following headers:

A B C D .. Z A1 B2 C2 D2 .. Z1

I need to multiply these in pairs and the result placed in the '1' columns, i.e. A1=A * A1, B1=B * B1, etc.

I've previously used the following code to multiply many columns by a fixed column:

= Table.FromRecords(Table.TransformRows(MyTable, (x) => Record.TransformFields(x, List.Transform({A1, B1}, (y) => {y, each _ * x[Fixed]}))))

I've tried referring to the column by number, but I just can't get this to work sigh

Any help would be greatly appreciated :)

0

There are 0 best solutions below