Calculate percentage by column

Hello!
I have a question about how to calculate ratios by columns without using column expression.
I have a table like this one with many columns and later I would need to use different variables:

I would need the same table but with percentages instead. I.e. for the first one would be: 1397 / total sum 11-F

If I use column expression node I would have to specify a new column for every column, since I want to do the same exercise with different variables using column expression would make the workflow not so automatic.

Does anyone have some hints on how to achieve it please?
Thanks!

Hello @mar_noca

The -Math Formula (Multi column)- node can be a possible solution, as follows:

To calculate the percentage values per column, I’m using here the following command:

$$CURRENT_COLUMN$$ / COL_MAX($$CURRENT_COLUMN$$) * 100

The node gives the option to replace the values of the selected columns or to append newly created columns with a suffix name as it is the case in my example where I add a “%” symbol to the original column names:

Please find the workflow here below:

Hope it helps.
Best
Ael

2 Likes

Thank so much! I tried that node but I wasn’t using it correctly! That’s exactly what I needed!

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.