How-To? Sum trailing/rolling 10-days

Hi guys,
Can you help me how to calculate trailing/rolling 10-day sum (see example below / img attached).

# Date Count T10D Cnt Observ
1 20-12-22 146
2 21-12-22 108
3 22-12-22 152
4 23-12-22 196
5 24-12-22 190
6 25-12-22 80
7 26-12-22 173
8 27-12-22 171
9 28-12-22 61
10 29-12-22 244 1,521 (20 to 29-12-22)
11 30-12-22 216 1,591 (21 to 30-12-22)
12 31-12-22 115 1,598 (22 to 31-12-22)
13 01-01-23 100 1,546 (…)
14 02-01-23 231 1,581

Thank you

Hi @nunolourisela

You can use windsum function to aggregate for the rolling N days.
Please use the below window function.

windowSum(sum(Count),[ Date ASC ],9,0)

Thanks
Vinod