Compare sum of revenue with dynamic dates
I would like to calculate the sum of the revenue of this month until today and compare it with that of the previous month until the same day and that the result increases every day. Here is an example to make it easier to understand.
sum of last month's revenue (from June 1st to June 27th)
sum of this month's revenue (from July 1st to July 27th)
The sum is accumulated every day. Then the next day it would look like this:
sum of last month's revenue (from June 1st to June 28th)
sum of this month's revenue (from July 1st to July 28th)
And so on...
As a result I would like to receive one number per month.
Is this possible?
Thanks for your help in advance.