need to show percentage of actions completed on time

F

F0zziebear

Hi,

I a column with the target date and another column with the actual date
completed. I want to calculate the percentage of actions completed by the
target date and show this in a report. Can you advise on how to do this?

J
 
S

S.Clark

I can name that tune in 3 queries...

Query2:
SELECT Q.Status, Count(Q.ID) AS Cnt
FROM [SELECT tblTarget.ID, IIf([Target]<=[Actual],"On Time","Late") AS Status
FROM tblTarget]. AS Q
GROUP BY Q.Status;

Query3:
SELECT Sum(Cnt) AS Whole
FROM Query2;

Query4:
SELECT Query2.Status, Query2.Cnt, Query3.Whole, [cnt]/[whole] AS Pct
FROM Query2, Query3;
 
Top