Hello,
thanks for all your helpful contributions so far, I hope you can help me with this issue.
Regarding the following table, I have to substract in row 1: Name1, [1] - [2] - [3]. The problem is that the number of fields is varying, so sometimes I can have only field [1] & [2] and the other time there can be 7 fields and each field has to be substracted from the field [1].
Name | 1 | 2 | 3 |
Name 1 | -500 | 0 | 0 |
Name 2 | 300 | 0 | 3 |
Name 3 | 1200 | 5 | 0 |
Name 4 | -120 | -230 | -450 |
It would be great if someone could help me.
Thank you!
Solved! Go to Solution.
Hi @verast23,
This is a very simple solution that should work for you.
As a first step, I standardised the input so it will always have 7 fields. After that, I used a simple formula tool to make the calculation.
Hi Emil,
thank you very much for your reply. I think I have expressed myself a little misleadingly. The number of fields is not limited to 7, it can be any number. Only field [1] always exists. So all existing other fields (except of [Name]) should be substracted.
Hi @verast23 ,
I have slightly altered your input to include more columns that may/may not be there. Your input would look like this:
And what you want to achieve is subtracting all values from column [1], right? If that's the case, the following workflow should work for you:
It will essentially aggregate (sum) all fields apart from field [1] to create this new column [Value to Subtract] and then with the formula tool you just make the subtraction.
Hope that helps, let me know if that worked for you.
Cheers,
Angelos
Thank you very much for your contributions, now it works!
Have a nice day!