I'm trying to get a count of items that were in a particular state on the first day of the trailing n months.
So, for example, items in state XYZ on...
12/1 to < 12/2
11/1 to < 11/2
etc.
I'm using DURING which works fine for the current month...
DURING (startOfMonth(), startOfMonth("+1d"))
For previous months, my thought was doing something like...
DURING (startOfMonth("-01M"), startOfMonth("-01M +1d"))
However, I don't seem to be able to "decrement a month and add a day". Could be my usage but it seems to only like to do a single direction (i.e. either decrement or increment).
Any thoughts on how one might do this without actually hard coding the dates (i.e. I realize you can just 2018-01-01 to 2018-01-02, etc.)
Thanks in advance.