Rolling 3 month Average in a dataview
Can I create a moving average in a dataview? For example I would like 12 months of data as Bars on a chart and then have a 3 month moving average as a line on the chart so lets say that periods 9,10,11,12 had the values 38, 40, 45, 49 on my chart the bar for period 12 would be at 49 and the 3 month ave for period 12 would be 44.6, and for period 11 the bar would be at 45 and the line would be at 41. Thanks!
Answers
-
Hi Adam,
check out the Yearly Moving Average in combination with Cycle: Time functions. This should give you the functionality you are looking for.
BR
Sebatian
3 -
Thanks Sebastian, used the time function to create two additional blocks (which i flagged as hidden) and used the time functions to offset to Previous period and also previous period -1, the algorithm is the (a+b+c)/3
2 -
Hi Adam,
this is also an possible solution. But you can also use (as suggested by Sebastian) some out of the box functionality.
So you only need one Block, with those 2 settings:
The cycle is used, to get a 3month moving Average instead a Yearly moving Average.
Regards
Björn
8 -
Thanks Bjorn, great tip!
2