Running sum of the last 12 months

I have a question with Quick Sight, I need to do the running sum of the last 12 months of a variable that is a distinct count of a string. I arrived to perform the running sum of this, nevertheless, it performs the running sum from the first period till the end of the period, and I need it to be for the last 12 months.
Something like this:

Date  | Distinct Count |Running sum (last 12 months)
Dec-19|A               |    A
Feb-20|B               |    A+B
Mar-20|C               |    A+B+C
…     |...             |    …
Dec-20|D               |    B+C+...+D

I assume that I need to create a new calculated field to perform this, but I have not been able to find the good function that does this on Quick Sight.

Thank you for your replies/comments.

you can try to do this with windowsum

It was that!
Thank you !!