Forum Discussion

Anonymous's avatar
Anonymous
Not applicable
3 years ago

12 Months rolling average

Hi Community,

I have a table name caseid and casedatevalue.

I need to have 12 month rolling average for every month.

In the below image, it is just doing rolling average but I need 12 months rolling avergae.

For eXAMPLE : For Feb.,2023 it must do sum casecount(feb2023+last11months till march 2022)/12 = 62/12 = 5.1666

Same for January 2023, it must do sum casecount(jan2023+last11months till feb 2022)/12 = 78/12 = 6.5

October 2022, Nov 2022 most probably can't have the same same average as for Oct 2022(It will be Oct 2022+last 11 months till nov 2021)/12.

 

Request your kind support. I will be available at your convenience.

 

Thank you Community!

amitchandak Ashish_Mathur 

CaseIdCaseDateValue
2226312/24/2022 0:00
223292/13/2023 0:00
2235912/5/2022 0:00
7256812/31/2022 0:00
7706812/21/2022 0:00
7822912/6/2022 0:00
7884512/7/2022 0:00
7886512/12/2022 0:00
8106512/8/2022 0:00
827793/1/2023 0:00
827901/1/2023 0:00
851451/30/2023 0:00
876731/20/2023 0:00
909301/1/2023 0:00
911376/1/2023 0:00
936341/30/2023 0:00
937851/1/2023 0:00
946051/1/2023 0:00
9567212/8/2022 0:00
9619512/21/2022 8:31
962841/1/2023 0:00
964121/1/2023 0:00
964161/1/2023 0:00
964211/1/2023 0:00
964221/1/2023 0:00
964231/1/2023 0:00
964241/1/2023 0:00
964261/1/2023 0:00
964271/1/2023 0:00
964291/1/2023 0:00
964311/1/2023 0:00
964321/1/2023 0:00
964341/1/2023 0:00
964351/1/2023 0:00
964361/1/2023 0:00
964371/1/2023 0:00
968421/1/2023 0:00
9684712/27/2022 10:34
968751/1/2023 0:00
969901/1/2023 0:00
9709612/1/2022 0:38
9709912/1/2022 0:00
9710412/1/2022 11:59
9710612/1/2022 0:00
9710912/1/2022 12:51
9712812/1/2022 0:00
9714612/1/2022 13:00
9715212/1/2022 12:12
9715812/1/2022 18:54
9719912/1/2022 0:00
9720012/1/2022 0:00
9720112/1/2022 0:00
9720212/2/2022 0:00
9720412/2/2022 10:08
9721412/2/2022 8:01
9725112/2/2022 11:50
9725212/2/2022 17:00
9725712/2/2022 0:00
9726612/2/2022 0:00
9726912/2/2022 14:09
9727012/2/2022 0:00
9727112/2/2022 14:21
9728012/2/2022 15:45
9728312/2/2022 0:00
9728712/1/2022 0:00
9730812/2/2022 0:00
9732212/4/2022 22:58
9732812/2/2022 11:00
9733112/5/2022 0:00
9733912/12/2022 0:00
9734112/19/2022 0:00
9734212/1/2022 0:00
9735412/5/2022 15:28
9735712/5/2022 15:32
9736012/1/2022 0:00
9738112/5/2022 0:00
9740312/1/2022 0:00
9740912/5/2022 0:00
9741512/1/2022 15:38
9741612/5/2022 0:00
9741712/5/2022 0:00
9741812/5/2022 0:00
9742212/5/2022 16:58
9742312/5/2022 17:05
9742412/5/2022 0:00
9743312/5/2022 0:00
9743612/6/2022 6:41
9743712/6/2022 6:44
9743812/2/2022 0:00
9743912/2/2022 0:00
9744012/2/2022 0:00
9744312/1/2022 7:02
9744412/1/2022 7:05
9744512/6/2022 11:35
9744712/1/2022 0:00
9744812/1/2022 7:16
9744912/6/2022 7:20
9745112/6/2022 7:34
9745612/3/2022 0:00
9746412/6/2022 0:00