Eliminate rows that values in a column that sums up to zero

@bruno29a, I was looking for your help if possible please?

Your solution here was great - thank you for your help: Eliminate rows that values in a column that sums up to zero - #15 by bruno29a

Where the workflow isn’t quite working for me is where I have a scenario like the following:

A = -10
A = 11
A = 9

Multiple rows where there are no matches. It’s great when there is a single row, it’s great when there are multiple rows when there are matches. But, I could have a situation similar to above, and that’s when it goes awry.

The Python node breaks out with the following:

name ‘combination’ is not defined
Traceback (most recent call last):
File “”, line 19, in
NameError: name ‘combination’ is not defined

Would you mind guiding me on how I can amend the workflow to cater for use cases where there could be multiple rows with no matches please?

Appreciate any help.

Thank you - John.

Hi @Unlockedata , I had to go over the whole thread to remember what the request was :rofl:

Indeed, the workflow was built on the rule that the data always had counter values, which was confirmed by the requester.
This is what I asked:

In this case, there aren’t the proper counter values, you will end up with:
D -7
D 5

Is that possible?

And this is what the requester confirmed:

always has the “counter” values, the target is to eliminate the negatives.

That workflow works only if that rule applies, and will not work if that rule is not there.

In order to help you, I need to first understand what you want to do, and what should happen when there is no match.

Thank you for the rapid response.

My scenario is similar to the original request. I’m dealing with transaction information for individuals, and the following can occur…

A-Spender: $20 (sale)
A-Spender: -$20 (refund)
A-Spender: $40 (sale)

B-Spender: $50 (sale)
B-Spender: $60 (sale)
B-Spender: $70 (sale)

C-Spender: $25 (sale)

D-Spender: $30 (sale)
D-Spender: $40 (sale)
D-Spender: -$30 (refund)

Where there is a match, your solution I believe would work. Where there is no match (B-Spender and C-Spender above) the transactions are ignored and loop continues to the next Spender.

Thank you for any help.

John.

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