Creating monthly periods between a date range

Tskutnik

Registered User.
Local time
Yesterday, 19:52
Joined
Sep 15, 2012
Messages
234
The project requires that projections are done for monthly profits.
The monthly estimated values are known = [MonthProfit]
The Date ranges to which the projection applies are: [StartDate] and [EndDate]

Given the following values:
[MonthProfit] = $2,500
[StartDate] = 3/1/17
[EndDate] = 6/30/17

I'd want the query output to show

Month of:
March = $2,500
April = $2,500
May = $2,500
June= $2,500

The question is how to make one [MonthProfit] value create 4 records for the 4 months between start and end dates.
I assume a query is the right way to go, and I'd rather stay away from code if possible

Thanks for any help
 
you can't create data out of nothing. You can calculate the total for the 4 month period by counting the months - i.e. produce one record of 10,000. Or you need another table containing a list of the months which you can use to create your 4 records.

Or you can use VBA to create the 4 records on the fly in a temporary table
 

Users who are viewing this thread

Back
Top Bottom