# Multiple 1 column to multiple column

Hi, I’m trying to do multiplication via KNIME. currently I’m having table as per below:

A B C E F G
0.2 100 50 100 50 50
0.3 80 40 80 40 40
0.2 80 30 80 30 30
0.8 90 40 90 40 40
0.5 100 80 100 80 80
0.6 60 90 60 90 90

Is there any nodes that could do multiplication of column A to B,C,E,F, and G directly?

I’m looking at math formula node but it’s quite long on the expression especially if I’m trying to multiply 10-20 column to 1 column.

Thanks!

1 Like

How about the Math Formula (Multi Column) node?

Select all columns except A and multiply current column to A:

`\$\$CURRENT_COLUMN\$\$ * \$A\$`

2 Likes

Hi @armingrudd,
I think @andersenyunan wants a single column that is derived from multiplying all the other columns. It can be done using the Column Aggregator. Here just select your columns and in the second tab select “Product” from the left list by double clicking on it.

Kind regards
Alexander

3 Likes

Yes, Maybe. But regarding his example table, it seems the column A values are some kind of factors by which the other values should be multiplied and also he says: “I’m trying to multiply 10-20 column to 1 column”.
But also he says: “I’m looking at math formula node but it’s quite long on the expression”. In this case, I think you are right and the product of all values is desired.

Anyway, now all options are on the table…!

3 Likes

Thanks for the solution! just wondering if the column to multiply is more than 1 could it still work? for instance something like this where the output would be between A to B,C,E,F,G and Z to B,C,E,F,G

A Z B C E F G B to A C to A E to A F to A G to A B to Z C to Z E to Z F to Z G to Z
0.2 0.4 100 50 100 50 50 20 10 20 10 10 40 20 40 20 20
0.3 0.6 80 40 80 40 40 24 12 24 12 12 48 24 48 24 24
0.2 0.2 80 30 80 30 30 16 6 16 6 6 16 6 16 6 6
0.8 0.8 90 40 90 40 40 72 32 72 32 32 72 32 72 32 32
0.5 0.5 100 80 100 80 80 50 40 50 40 40 50 40 50 40 40
0.6 0.9 60 90 60 90 90 36 54 36 54 54 54 81 54 81 81
0.6 0.7 60 90 60 90 90 36 54 36 54 54 42 63 42 63 63
2 Likes

Hi @andersenyunan,
so @armingrudd’s solution is the one that is applicable here. I thought you want to calculate the product of all columns. To get a table like the one above, you will need to use two Math Formula (Multi Column) nodes. One for A and one for Z.
Kind regards
Alexander

4 Likes

Got it, thanks!

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