Matthias,
I created a synthetic case in workbench trying to follow your requirements for one signal so that you can adapt it to your situation. Please find below the workflow and code in formula:
The associated results for the last three months are as follow:
Note that the monthly sum of March is still uncertain (showed as a vertical bar with dashed lines) because the current month has not finished yet (03/17/2023). There are other ways to approach this situation, but the current methodology minimizes the uncertainty.
Hope this helps you.
Regards,
Alexander