Splitting out a data set for groups of rows but values have to net to zero

Hi @taylorpeter55 , thanks for the update and additional rules. This is certainly going to be more of a challenge and it looks like somewhere within a specific set of entries for a journal, we are going to need to find all the groupings of values within the journal that when summed (or by themselves) make the value of each journal entry. and then determine which groupings are “optimal”.

This part has echoes of a post from almost a year ago, which I think I’ll be reviewing to see if some of the ideas can be pulled in here.

By the way, do you have Python installed in your KNIME environment? That might determine the route we take.

This was last year’s post which you may find of interest too…

Quick question, when you are balancing:
… you have basically a set of negative numbers to be balanced by a set of positive numbers. But is it true to say that there will always be a SINGLE NEGATIVE value balanced by ONE OR MORE POSITIVE values.

So the following “balances” could occur:

-1000 = +1000
-1000 = +600, +400
-1000 = + 500, +400, +100

But the following “balances” will never occur:
-1000, -2000 = +3000
-1000 = + 600 +500 -100

Is that correct?

1 Like