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

Moving Average

Inactive User
Not applicable

Hi,

 

I have millions of data. I need to take average of last 12 records for every fields. 

 

for eg:-

 average of last 3 for each column.

 

Col1 Col2 Col3 Col4 Col5

1       2        3      5      6

2       3        4      5       6

3      4         5      6      7   

4     5         6      7

5     6         7

6     7

7

 

output:

Col1  Col2  col3   col4   col5

6        6        6        6        6

 

Every time it moves to right side average of 3 moves up too. I need to make this using alteryx.

 

Thanks

3 REPLIES 3
brindhan
9 - Comet

Hi @Inactive User

Attached is the solution. Wondering if there's a more elegant method for this though...

Hope this helps.

Cheers!

Capture2.PNG

 

Inactive User
Not applicable

Thanks for the response. Yes, This is working but I missed one step to share that average should replace the Null values of above... for eg: avg we go from col3  should replace all null vales of col3 and same for col4.

 

Thanks!

brindhan
9 - Comet

Hi @Inactive User

Here you go.

Also, check out the imputation field to replace nulls, etc, might help you.

 

Cheers,

B

 

Labels