There are two line charts in my QV app (attached): one is the original data, the another one is the moving range- the difference between data point and the previous data point. The moving range is calcuated using Above function. I tried to get the overall average for the moving range data in second chart by using a variable. Just cannot get it done after many tries. I used this function