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

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

felixcaspari
7 - Meteor

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.

 

   

7 REPLIES 7
mmenth
11 - 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

mmenth
11 - Bolide

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

 

Best,

mmenth

felixcaspari
7 - Meteor

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

 

 

hfanda73
8 - Asteroid

love how your brain works. excellent.

BhatiaSakshi
8 - Asteroid

I have similar issue, i am attaching my query as well as the desired output. Please help.

 

SO I have 3 scenarios with me and I need to calculate 2 additional scenarios averaging the above three I had. There would always same number of rows in every scenario but name would be different

BhatiaSakshi
8 - Asteroid

Can some one please help me on this

felixcaspari
7 - Meteor

@BhatiaSakshi - I am sure there are more efficient ways to get to the desired outcome. But the attached workbook will get you there. Please keep in mind that you will have to add a "Multi-Row Formula" for each column in your data set. I hope this helps.

 

 

Labels