Start Free Trial

Alteryx Designer Desktop Discussions

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

Moving Average via Multi-Row-Formula: How to Define Range for Average Function

Degas
7 - Meteor

Hi everyone,

 

I'm using the Multi-Row-Formula tool to calculate a moving average of headcount for a period of 6 days:

 

ROUND(
AVERAGE(
[Row-5:Headcount], 
[Row-4:Headcount], 
[Row-3:Headcount], 
[Row-2:Headcount], 
[Row-1:Headcount], 
[Headcount]), 
0.01)

 

That works without problem. But what do I do if I want to calculate the moving average for a period of 365 days? Do I really need to add 365 rows to the average function ([Row-364:Headcount] until [Headcount])? That would be extremely tiresome.

 

Is there a way to define a range for the average function, instead of defining every single entry?

 

Thanks a lot in advance!

 

Best,

Degas

11 REPLIES 11
Sebastiaandb
12 - Quasar

Hi @Degas,

 

Did you follow @AngelosPachis tip to alter the version in a text editor? Did it work out for you :-)?! If not, let me know the Designer version you're running, i can post a version that should work for you.

 @AngelosPachis  thanks for helping @Degas out!

My macro is not the same as CharlieS's but i would say it's built on the same batch macro technique :-).!

 

Greetings,

 

Seb

 

 

Degas
7 - Meteor

Yes, it worked! Thanks a lot again to you both 😄

Labels
Top Solution Authors