How do we solve it..? Math, Rule Engine, Column Expression

Hi All,
in knime how would we pick particular cell to add & subtract to get the result values
Please find the above excel formula.

Thanks in advance

Hi @sundipsandy , you can use the Lag Column node to get values from other rows relative to the current row for any column. You can then use Math Formula node to do your math operation with the values.

The most recent Column Expressions now has the feature to use the values from another row (check the Multi-row access in the Advanced Tab). This can be done via the function column(column, offset). You can do your Math operations directly in the Column Expressions once you get the values of the desired rows/cells


We can’t just answer a question like this. KNIME workflows create a repeatable process that is designed to withstand future use. Your question (how do we add this row + that row + that row…) is a “one off” manual excel calculation with no context. You need to change the way you approach problems in KNIME so that you define what your final end goal is in the abstract (not just try to recreate each manual step that was done in Excel). Then begin to think about how you might build a repeatable and dependable structure to get there using more global tools.

For instance: Lets say you trying to get a grand total of subtotal lines…

How do we target those rows? Do the account names all include “subtotal”, do the subtotal names all start with a tab or space character, do the account numbers follow some definite structure, is there always a proceeding or following blank row, is the data structure going to be stable going forward, etc.

What is the end goal of the calculation? Your example could be achieved with a simple groupby sum once you have isolated your target rows, if that was indeed your end goal and not just a step in the process.

Your posts follow a pattern of asking “how do I do this single Excel step” without giving context. I would start with looking at some KNIME tutorials on youtube to get your feet under you as to how you might think about things differently in KNIME.


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