Hi,
I have a dataset where the number of columns and rows changes each time the workflow is run.
I need to apply a formula to each cell of this dataset - each entry has a multiplier and a variable number of "Data" columns. Each "Data" column needs multiplying by the multiplier in that row.
Example:
Input Data:
Record | Multiplier | Data Col 1 | Data Col 2 | Data Col 3 | Data Col 4 |
a | 2 | 10 | 15 | 10 | 20 |
b | 2.5 | 20 | 15 | 5 | 5 |
c | 2 | 10 | 15 | 10 | 20 |
d | 1 | 20 | 15 | 5 | 5 |
e | 5 | 25 | 30 | 40 | 30 |
f | 4 | 20 | 15 | 5 | 5 |
Output:
Record | Multiplier | Data Col 1 | Data Col 2 | Data Col 3 | Data Col 4 | Result Col 1 | Result Col 2 | Result Col 3 | Result Col 4 |
a | 2 | 10 | 15 | 10 | 20 | 20 | 30 | 20 | 40 |
b | 2.5 | 20 | 15 | 5 | 5 | 50 | 37.5 | 12.5 | 12.5 |
c | 2 | 10 | 15 | 10 | 20 | 20 | 30 | 20 | 40 |
d | 1 | 20 | 15 | 5 | 5 | 20 | 15 | 5 | 5 |
e | 5 | 25 | 30 | 40 | 30 | 125 | 120 | 200 | 150 |
f | 4 | 20 | 15 | 5 | 5 | 80 | 60 | 20 | 20 |
So, .e.g for record E, each "Result" column is the equivalently numbered "Data" column multiplied by the multiplier for E (5).
Any help would be appreciated!
Thanks
@tomcolli one way of doing this
@tomcolli look at the multi field tool, selecting the data columns
and then setting it to multplier*[current field]
Hope this helps