Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

The highly anticipated Alteryx Community tradition is back! We hope you'll join us!

Learn More

Create new rows based on the average of the previous three rows


Alteryx Community- I would like to add rows to my workflow that are based on a certain criteria


(1) Project ID -> should take the latest project id and add one to it (i.e. 3 -> 4)


(2) Expected Hours (applies to columns B, C & D) -> should display the average hours based on the actuals in three previous rows/IDs (assuming 1, 2 and 3 are actuals)


Here is a mock up of what I would like to produce:




I would like to point out that the intent of this workflow is to forecast expected capacity for the respective departments. So forecasts (i.e. project id 4) will eventually be replaced with actuals in order to provide more accurate forecasts. Therefore I am trying to avoid referencing particular ID #s in my calculations, but rather a relative position (i.e. row -1).


I am interest to see what you guys come up with- thanks in advance for the support.




Hey, @felixcaspari 


You could utilize the multi-row formula tool along with the generate rows tool like I have in the attached.





Actually, I realized I had a mistake in that previous post, I've fixed it in this attachment.




@mmenth thank you for sharing- this was very helpful. The second version did the trick! 




love how your brain works. excellent.