CR 2016
SQL Server
I'm writing a report will I will have two columns of summary line items of the last two complete months
I'm using lastfullmonth for "last month" or I can also use this:
{date_field} in datevalue(year(currentdate),1,month(currentdate))
to currentdate-day(currentdate)
What I am having trouble with is adjusting the above formula for the complete month two months ago.
I can easily accomplish this by using a crosstab, but I need to have the formulas in a group header, so I'm making a manual crosstab and need the proper formula for dates two months ago.
Any help is appreciated.
Thanks
Ed
SQL Server
I'm writing a report will I will have two columns of summary line items of the last two complete months
I'm using lastfullmonth for "last month" or I can also use this:
{date_field} in datevalue(year(currentdate),1,month(currentdate))
to currentdate-day(currentdate)
What I am having trouble with is adjusting the above formula for the complete month two months ago.
I can easily accomplish this by using a crosstab, but I need to have the formulas in a group header, so I'm making a manual crosstab and need the proper formula for dates two months ago.
Any help is appreciated.
Thanks
Ed