Note that there are some explanatory texts on larger screens.

plurals
  1. POMS-Access Calculating Percentage of Completed Tasks in a Report
    primarykey
    data
    text
    <p>As the title says, I'm looking for a way to calculate the percentage of completed tasks a person has. Data is structured so that each individual has can have many tasks, and each task can have many sub-tasks, as described below:</p> <p><strong>Employees</strong></p> <ul> <li>(pk)(AutoNumber)employee_id</li> <li>(Text)FirstName</li> <li>(Text)LastName</li> </ul> <p><strong>Tasks</strong></p> <ul> <li>(pk)(AutoNumber)task_id</li> <li>(fk)(Number)employee_id</li> <li>(Memo)Description</li> <li>(Yes/No)Completed</li> </ul> <p><strong>Sub-Tasks</strong></p> <ul> <li>(pk)(AutoNumber)subtask_id</li> <li>(fk)(Number)task_id</li> <li>(Memo)Description</li> <li>(Yes/No)Completed</li> </ul> <p>I've been trying to make a report (named "Task Completion Rates") that lists all employees, the number of completed tasks they have, the total number of tasks they have, and their completion rate as a percentage. At the moment, I have the following two queries:</p> <ul> <li>SELECT Count(employee_id) FROM [Tasks] AS TotalTasks WHERE [Tasks].employee_id = Reports![Task Completion Rates]!txt_employeeID</li> <li>SELECT Count(employee_id) FROM [Tasks] AS CompletedTasks WHERE [Tasks].employee_id = Reports![Task Completion Rates]!txt_employeeID AND [Tasks].Completed = 1</li> </ul> <p>Are both of those necessary, or is there a way to get both counts from one query? Also, how would I go about using those totals in the report? The report's Record Source is set to the Employees table so that it can list them all. I've got text boxes ready to go for each total, but I'm having problems using the expression builder in the source for each text box to actually display the results of the queries. I set the source for one of the text boxes to =[qry_TotalTasksPerEmployee]![TotalTasks] (via expression builder) but it keeps prompting me to enter a value for [qry_TotalTasksPerEmployee]. Any ideas on how get this working?</p>
    singulars
    1. This table or related slice is empty.
    plurals
    1. This table or related slice is empty.
    1. This table or related slice is empty.
    1. This table or related slice is empty.
 

Querying!

 
Guidance

SQuiL has stopped working due to an internal error.

If you are curious you may find further information in the browser console, which is accessible through the devtools (F12).

Reload