# using math formula to incrementally divide multiple changing columns

I have a table with 18 columns i wish to perform simple math functions on (columns 1-9 labeled QValue1, QValue2, etc.) and (columns 10-18 labeled Q1+Mean, Q2+Mean, etc.).

I wish to use the math formula multi column node to incrementally divide QValue1 column cells by Q1+Mean cells across all rows, then divide QValue2 column cells by Q2+Mean cells, etc., all the way down the series of rows.

For example: QValue1 / Q1+Mean, row 1 (5/10=.5), QValue2 / Q2+Mean, row 1 (7/20=.35), …QValue9 / Q9+Mean row 30 (0/3=0).

I just can’t seem to automate this process of simultaneously moving from QValue1 with Q1+Mean, then QValue2 with Q+2Mean, etc. in the math formula multi column node.

Any assistance is really appreciated. Graphics and data are attached below.

temp.xlsx (6.2 KB)

Hello @creedsmith,

that is not possible with Math Formula (Multi Column) node.If you want to automate this kind of operation you should use loop.

Br,
Ivan

Okay, thank you. I appreciate the advice.

Hi @creedsmith,

another option would be to use the Column Expressions node. There you can simply add all your different column calculations. Here is an example for your data: ColumnExpressions.knwf (14.4 KB)

I hope that helps.

Best,
Janina

2 Likes

Wow, this looks interesting. I will work with what you have here to better understand the Column Expressions Node. I have not worked with this one before. Thanks!

3 Likes

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