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!

Weekly Challenges

Solve the challenge, share your solution and summit the ranks of our Community!

Also available in | Français | Português | Español | 日本語
IDEAS WANTED

Want to get involved? We're always looking for ideas and content for Weekly Challenges.

SUBMIT YOUR IDEA

Challenge #3: Running Averages

apathetichell
18 - Pollux

The provided output solution for this one confused me. I think this is the right answer (albeit in a caveman style) but I can't quite tell. I sorted out the RM Category from the value field to allow for easier reading...

mdsalmankhan89
8 - Asteroid

Here's my solution. Kind of brute force. Am trying to come-up with more elegant solution using macros but not yet there. 

Not sure why 6 month running average was not used to group data, so I too modified by solution to match the result. 

Luke_C
17 - Castor
Spoiler
Challenge003.PNG

ClaireDonaz
6 - Meteoroid

Challenge done but I didn't do the last transpose of the solution as it makes no sense to me... Also I used the average function

federicohernandezd
6 - Meteoroid

My solution, must say I based my workflow on others... new to multirow formula, but it's really powerful. 

Kentwang59
7 - Meteor
Spoiler
Kentwang59_0-1615844382528.png

 

dhavaldoshi
8 - Asteroid

How to do it as a Beginner?

Things to learn:

  • Multi-row tool: Name a tool, top of your head in the Formula tool palette that computes across rows and not columns in Alteryx!
    • Very important to impute values or automation while considering values in previous or next rows
    • Any mathematical formula that requires you to check value in previous row, you use this tool..

.....so what do you use for running averages for 3/6 months?

 

  • Data Imputation: You can either use a 0 as in solution provided on the question or use Multi-Row like I have in the spoiler below
  • Cross Tab and Transpose: Phew! The amount of times you are going to use this in automation in reporting is huge, hopefully you don't have a lot of flat tables to deal with, but if you do, Transpose is your best friend and for everything output, you have cross tab!
Spoiler
Solution_3.PNG

 P.S.: My answer is going to be different than the solution

Gopi_Krishna_Bandi
8 - Asteroid

Hi,

 

Can someone let me know if my solution is correct. I have done only for 3 months. Will do the same for 6 months if this is correct

KilianL
Alteryx Alumni (Retired)

Great Challenge and shows the power of the grouping options of the sample and multi row formula tools.

 

On the downside, the example and output data don't make any sense to me.

As for a 3 month average for 2 month - this is not defined, so I left them blank.
(The average of the first 2 month could be an alternative)

 

Spoiler
The trick is to group by Name and Category to calculate moving averages inside these groups.
003 - Running Averages - Kilian.png
AlexPeacock
8 - Asteroid

My Solution