Counting each month

HI,

i got a problem which is very urgent ,if u can please try to help me,

definitions:
planned-task planned for current month
Actual-completed task
Past due-all open tasks (current date is past planned finish date)
Proj total-will be total accumlation of all planned,actual, and past due tasks.

ex: if AUGUST month is our planned, or future month. we would like only to see how many planned tasks are schedule for this month,and how many past due tasks to date we have.

month to display:
2 past months
1 current month
1 future month
1 total

i need a report to be displayed as below:

                  MAy     JUNE   JULY   AUG   PROJ TOTAL

Planned 10 8 5 4 27

Actual 7 4 9 20

PastDue 3 7 3 3 7

IN THIS EXAMPLE, MAY is the starting date for this project.We planned 10 tasks,completed 7,so we have 3 past due.In June, we planned 8 tasks,completed 4,so past due has 7.This is 3 carried over from may,plus 4 not completed in june.In July,our schedule shows we have 5 planned tasks,we completed 9,so our past due is 3.
Aug is our planned, or future month.we would like only to see how many planned tasks are schedule for this month,and how many past due tasks to date we have.
(i need to count the each months how many time it occured in each month)

i am using sql server,if possible try to give me detail way.
it’s very urgent please try to spare time for me,
Thanks in Advance for help,
raj


mailkumarraja (BOB member since 2004-08-05)

Greetings, and welcome to BOB. :bob: You posted this in the wrong forum so I moved it to Reporter for you. :wink:

Please review this document, specifically this item regarding how to phrase your question, thanks.

I assume that you will need to use the CASE statement to sort values out by date. You’ll have to look at the assigned date, the completed date, and the current (system) date to determine where to set flags. If you set a flag with a value of 1 or 0 depending on whether a project was completed in the month it was scheduled or not, then the counts become a “sum” of the 1 or 0 values.


Dave Rathbun :us: (BOB member since 2002-06-06)