smueller72
IS-IT--Management
Hi all - I have a pretty basic report(at least I thought) that sums invoice totals and puts them into various 'buckets'. Through much trial and error I thought I had gotten the formulas working correctly. However, today, one of our marketing folks noticed an issue with the numbers not adding up properly across the buckets. In looking back at my formulas I realized that I had incorrectly assumed that if you used the DateAdd function to subtract one month from the last day of a given month(2/28 in this case) that the function was 'smart' enough to return the last day of the prior month. This was not that case as it was going back to 1/28 rather than 1/31 as I had assumed.
Rather than add to the, already ungodly, amount of logic(and incorrect logic at that) in these formulas, I thought I would look for some advice here on how to create optimized formulas for the following buckets:
Current MTD
Prior Month
Current YTD
Current Quarter to Date
Prior Quarter to Date
Trailing 6,12,18 months
The invoice cutoff datetime is the parameter provided to the report.
Probably pretty easy stuff for some of your gurus. Any help would be greatly appreciated.
Rather than add to the, already ungodly, amount of logic(and incorrect logic at that) in these formulas, I thought I would look for some advice here on how to create optimized formulas for the following buckets:
Current MTD
Prior Month
Current YTD
Current Quarter to Date
Prior Quarter to Date
Trailing 6,12,18 months
The invoice cutoff datetime is the parameter provided to the report.
Probably pretty easy stuff for some of your gurus. Any help would be greatly appreciated.