I think this is a solution - there are some questions I have about how you want to address Nulls for next start date and 0 for "Frequency"
but see below - the way the chart is read is for each PMnum that has a Next Start Date within a month (Blue Bar) the Orange bar is the total number of times those pmnums will be executed before 12/31/2018
The Key Calculations are
Number of months between next start date and 12/31/2018 > DATEDIFF('month',[Nextdatecalc],makedate(2018,12,31))
and the number of times the pmnum is done before 12/13/2018> IF [Months next start - end of year]>0 then Int([Months next start - end of year]/[Frequency]) else 0 end
Let me know if this does work
If this posts assists in resolving the question, please mark it helpful or as the 'correct answer' if it resolves the question. This will help other users find the same answer/resolution. Thank you.
Maintenance Schedule.twbx 461.7 KB