community
cancel
Showing results for 
Search instead for 
Did you mean: 

Alteryx designer Discussions

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

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:

 

Conditional_Row_Additions.PNG

 

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.

 

   

Bolide

Hey, @felixcaspari 

 

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

 

Best,

mmenth

Highlighted
Bolide

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

 

Best,

mmenth

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

 

 

Asteroid

love how your brain works. excellent.

Labels