Let's say I have sales number of last 60 days. I can just draw a graph to see how sales has changed overtime. Numbers vary in different days, like on weekends sales numbers decrease.

However, I would like to get sum of every last X days of everyday. So that I can have more idea and better distributed number of sales.

For example my graph will include

  • Sum of Day - 60 to 30
  • Sum of Day - 59 to 29
  • Sum of Day - 58 to 28
  • Sum of Day - 57 to 27


  • Sum of Day - 33 to 3
  • Sum of Day - 32 to 2
  • Sum of Day - 31 to 1

I am wondering what this is called technically and theoretically(recursive, iterative, culumative )? What type of graph can I use for it

Also it would be great if you can give an example if there is an example of excel for this.

  • 1
    $\begingroup$ The general topic is 'moving average'. In R. $\endgroup$ – BruceET Jan 12 at 20:10
  • $\begingroup$ Thank you. This is the answer that I was looking for. If you can create an answer, I can approve it. $\endgroup$ – SNaRe Jan 13 at 7:45
  • 1
    $\begingroup$ Glad my comment was helpful. For this brief item, I'm happy to take your thanks in lieu of reputation points. And maybe someone knows how to do it in Excel. $\endgroup$ – BruceET Jan 13 at 7:57

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.