Hi, I am trying to use the Multi-Row Formula Tool to create a running total column that resets everytime it hits my max number of 13500. It works for the most parts, except that it doesnt reset the running total at the row that goes over my max, but rather the following. Below are examples, highlighted are the rows that went over the max and the row where the actual running total reset- one row too late. Anyone have any suggestions to getting the running total to reset on the actual row that is over the max?
Solved! Go to Solution.
Hi @JMart2135
Can you provide some sample input and expected output it will help us get a better understanding of the usecase.
Hi @atcodedog05 , i have attached a sample workflow with the behavior repeated. What i would expect/am trying to get working is that the running total would reset on row 4 since the running total is over the max for that row. However, the running total doesnt reset until row 5.
Hi @JMart2135 Change your formula to this:
If ISNULL([Row-1:Group]) THEN [#]
ELSEIF ([Row-1:RunningTotal]+[#])>=[Max#] THEN [#]
ELSE [#]+[Row-1:RunningTotal]
ENDIF
You need to check if the previous row, plus the current value will take you over the threshold, rather than just the previous row.
Hope that helps,
Ollie
Thats it! Thank you so much for the quick support!
Happy to help : ) @JMart2135
Cheers and have a nice day!