I have a table with quite a few numeric columns that I need to update multiplying their values by another column. For example, if the original table were like this:
+---------+---------+---------+------------+
| value 1 | value 2 | value 3 | Multiplier |
+---------+---------+---------+------------+
| 100 | 50 | 30 | 2 |
| 100 | 50 | 30 | 0.5 |
| 100 | 50 | 30 | 1 |
+---------+---------+---------+------------+
I'd need to update it like this:
+---------+---------+---------+------------+
| value 1 | value 2 | value 3 | Multiplier |
+---------+---------+---------+------------+
| 200 | 100 | 60 | 2 |
| 50 | 25 | 15 | 0.5 |
| 100 | 50 | 30 | 1 |
+---------+---------+---------+------------+
This post explains how to do it one column at a time, and in my case this approach looks like this:
#"Replaced Value" = Table.ReplaceValue(#"Renamed Columns", each [value 1], each [value 1] * [Multiplier], Replacer.ReplaceValue,{"value 1"}),
#"Replaced Value 2" = Table.ReplaceValue(#"Replaced Value", each [value 2], each [value 2] * [Multiplier], Replacer.ReplaceValue,{"value 2"}),
#"Replaced Value 3" = Table.ReplaceValue(#"Replaced Value 2", each [value 3], each [value 3] * [Multiplier], Replacer.ReplaceValue,{"value 3"})
Is there a way to do this, or something similar, in one single step?