How apply IF (String) and calculation in same node

Hi everyone, I appreciate your help to identify with which node and with which configuration I can do this:
First: I need that the system in the column “Determination” only considers the criteria “No Apply” to apply in the next calculation.
Second: According to previous criteria I need to take the total amount of table B and subtract the total amount of Table A, only of the cases that have in determination “No Apply”.

Thanks for your support and ideas with this case!

Hi @Rebe1441,
it depends on how your final table should looks like.

One option is to use row splitter based on your column ‘Determination’ and join your table B to the output port having the results for “No apply” and then do a simple math calculation and afterwards append both splitted arms to have a complete table.

But this is only an example how you can do. As i mentioned befor it’s finaly depends on your expected outcome.

BR

2 Likes

Hi @Rebe1441
I would use the Rule Engine node to add a column based on this Determination column and give it either a 1 when “Apply” or 0 (zero) in the other cases.
Use this column as multiplier in a formula you enter with a Math Formula node.
I see in questions often the urge to attempt to put everything in one node. Personally I like to keep things simple: make small steps. If you need to change or enhance things later, it is easier to add one small step again, compared to change a single node which becomes even more complex.
And if you feel your workflow gets too crowded, just move nodes into a metanode or component.

2 Likes

Hello @Rebe1441,

considering you have data in two tables there is no one node solution for this. First you have to combine needed columns either using Joiner node or if you only need to add Total column from Table B to table A I suggest Cell Replacer node. Then there is Column Expressions if you are looking for a solution with minimum nodes (or some other scripting like Java and Python) that is based on JavaScript syntax. See this workflow examples for it if/else with calculation:

Br,
Ivan

1 Like

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