if a total amount over the past 31 days is ..

if a total amount over the past 31 days is ..

Hello,

is there any guru to help me out with that

How could i script the following : if a total amount over the past 31 days is then..

I totaly lost at it


thank you in advance