How to calculate rolling 12 month?

I have measure no_of_survey and want to calculate rolling 12 month of no_of_survey.

Example:

Rolling 12 month for Jan-20 = 130 (sum of value Feb-19 ~ Jan-20)

Jan-19 10
Feb-19 5
Mar-19 10
Apr-19 12
May-19 13
Jun-19 15
Jul-19 12
Aug-19 13
Sep-19 10
Oct-19 5
Nov-19 10
Dec-19 15
Jan-20 10
3replies Oldest first
  • Oldest first
  • Newest first
  • Active threads
  • Popular
  • Try using cumulative_sum formula 

     

    And filter for last 12 months? 

    Like
  • moving_sum() is the formula you are looking for

    moving_sum ( no_of_survey , 12, -1 , surveydate ) 
    Like 1
  • Dan Howell ,

    Thanks and it works

    for rolling 12 months I use : 

    moving_sum (no_of_survey , 11 , 0, surveydate ) 
    Like
Like Follow
  • Status Answered
  • 3 mths agoLast active
  • 3Replies
  • 69Views
  • 3 Following