Need your help with following problem:
I have a query with an Excel table as a source. This table has several user-input columns, which are now required to be multiplied by a coefficient from another column in this table. Column names should be retained.
Example:
let
Source = Table.FromColumns({{1, 1}, {2, 2}, {null, 0.5}}, {"Clmn1", "Clmn2", "ClmnMultiplier"})
in
Source
Is there any way to update their values like that:
row[Clmn1] = row[Clmn1] * IsNull(Row[ClmnMultiplier],1)
row[Clmn2] = row[Clmn2] * IsNull(Row[ClmnMultiplier],1)
or even better by applying a logic for a list of columns.
Sure I can do it by creating new columns, one by one, but I find this both not elegant and not productive.
Can anyone give me an advice on this? Thank you!