I keep thinking this should be easy but the answer is evading me. In Excel Power Query, I would like to transform the value in each row of a column based on another column\
Here is how I ended up doing this:
Table1:
Column A | Column B
-------------------
X | 1
Y | 2
= Table.FromRecords(Table.TransformRows(Table1,
(r) => Record.TransformFields(r,
{"A", each if r[Column B]="1" then "Z" else _})))
Result:
Column A | Column B
-------------------
Z | 1
Y | 2
This way you can transform multiple columns at once by using a nested list in the Record.TransformFields function.