4 Replies Latest reply on Nov 29, 2016 10:13 PM by Shinichiro Murakami

    how to get average of last 6 data points and only display one value?

    jenn.ng

      Below table shows for each revenue variance, what the corresponding last 7 weeks of average is for that week.

      I am able to write the formula to get the average of the last n values from each of my data but i only want to show the average for the latest value (week 9).

      So for week 9, the revenue variance is 0.15. Its average value is equal to (0.15+0+0.17+0.02+0.1+0.14+0)/7) = 0.0829.

       

      Week 9 is the current week as you can see, the rest of the revenue variance from week 10 onwards are 0.

       

      How do i show just the current week and its average value without showing all the other weeks values?

      I tried editing the week in the filter but that caused my average value to change.

       

      the calculated field i used were:

      index for average = last() ---> of which i select 0.

      Avg = WINDOW_AVG(sum([Revenue Variance]),-6,0)

      Screen Shot 2016-11-29 at 3.19.37 PM.png

       

      Thanks,

      jenn