im a newby at Knime and have a question about combining two tables as follow.
I have two tables
when i use the concatenate node, then the two tables are simply added one below the other like above. What i want is something like this:
Difference= Positive - Negative
Maybe i need several nodes to do that. I need help! I am grateful for any help.
Well, this is very simple to do:
just join the two tables using a joiner node, using Term as a key.
Then u have to rename the columns (positive and negative) and with the help of a math node, calculate the difference between values.
Hope it helps.
And don’t forget to use the Missing Value node to create the “0” before doing the Math.
it helped me a lot, but
It worked well for the terms that are present in both tables.
But if the term does not exist in the positive table but in the negative table, the term is not displayed in the term column. Instead, there are question marks. How can I fix it?
This is the setting of the Joiner
Rename column and replacing the “?” with 0 worked very fine.
Did you notice the bottom right part of the second tab “Column Selection”
Make sure you uncheck both.
Thank you HansS,
now it looks like
Now i will modify it to the shape i want, i showed in my first post. Thank you HansS and Luca_Italy
and as a final step I suggest to use new Joiner node - Joiner (Labs) where you can chose option to Merge join columns and non matching keys will be preserved
Welcome to KNIME Community!
wow that was easy with the Joiner(Laps). Thank you ipazin.
We get this like i wanted. Perfect!
wouldn’t renaming the sum column first and then concatenate and use a union of columns return the same result?
not really as sums from matching Terms (e.g. strategic from above picture) should be in same row
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.