In case you missed the announcement: The Alteryx One Fall Release is here! Learn more about the new features and capabilities here
ACT NOW: The Alteryx team will be retiring support for Community account recovery and Community email-change requests after December 31, 2025. Set up your security questions now so you can recover your account anytime, just log out and back in to get started. Learn more here
Start Free Trial

Alteryx Designer Desktop Discussions

Find answers, ask questions, and share expertise about Alteryx Designer Desktop and Intelligence Suite.

Delete negatives until total is positive

rafatomillero
7 - Meteor

How do I add the Total of A and delete all the negative values in A until the Total is positive? In the example below it would delete the first two -16:

 

ATotal
25-18
6 
-16 
-16 
2 
-26 
7 

 

It would then look like this

 

ATotal
2514
6 
  
  
2 
-26 
7 
3 REPLIES 3
Jay-RDC
8 - Asteroid

Is there a reason why you deleted -16 on your example? Should the total be based in the order of adding per row number?

PhilipMannering
16 - Nebula
16 - Nebula

An iterative macro solution would work,

 

PhilipMannering_1-1659370576302.png

 

PhilipMannering_0-1659370553807.png

 

rafatomillero
7 - Meteor

It can delete any number as long as the total is positive, but I thought of it as a loop.

Labels
Top Solution Authors