Community Spring Cleaning week is here! Join your fellow Maveryx in digging through your old posts and marking comments on them as solved. Learn more here!

Alteryx Designer Desktop Discussions

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

Multi-Row Formula Tool Help

JMart2135
8 - Asteroid

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?

 

Multirow Formula.png

 

Multirow Formula Results.png

 

6 REPLIES 6
atcodedog05
22 - Nova
22 - Nova

Hi @JMart2135 

 

Can you provide some sample input and expected output it will help us get a better understanding of the usecase.

JMart2135
8 - Asteroid

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.

OllieClarke
15 - Aurora
15 - Aurora

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

atcodedog05
22 - Nova
22 - Nova

Hi @JMart2135 

 

Here is the updated formula

 

atcodedog05_0-1632318505436.png

 

Hope this helps : )

 

JMart2135
8 - Asteroid

Thats it! Thank you so much for the quick support!

atcodedog05
22 - Nova
22 - Nova

Happy to help : ) @JMart2135 

Cheers and have a nice day!

Labels