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

Is there a way to create running averages?

gumbatman
8 - Asteroid

Hello,

 

I know I can do a running total on fields, but is there a way to do a running average? I was thinking that maybe using an iterative macro would work. I am new to Alteryx, and loving it, but I still have so much to learn.

 

I did see the Running Averages Challenge, but is seems to me that you need to know the number of rows you are going to have prior to creating that. I could certainly be misunderstanding the solutions I saw.

 

Thank you.

3 REPLIES 3
DanHare
11 - Bolide

Hey

I guess it depends (I am a consultant after all !) on what you want, but we have used several Multi Row formula tools for this.

Set a "marker" field to keep track of your grouping column, then you can refer to this in an iterative way to fill down the rows that you want to average together.

Then group by this and calculate average.

 

It would help if you posted the source dataset and the desired outcome.

 

Cheers

adm510
11 - Bolide

This is how I would do it....

 

Sort the data

Use a multi-row tool to create a running total

Use a record id to give you the row # (you could also use a multi row tool to create a custom row #)

Use the running total and divide it by the record id

 

Take a look at the attached example

gumbatman
8 - Asteroid

adm510,

 

Thank you so much for that. That perfectly answers what I was looking for!

 

Labels