SIMPLE Math % Question

J

Judi

Hi, my brain seems to have shut down temporarily and I need help with
something.

I have a field in a query that returns 1 or 0 and I need to find the % of
times that the answer is 1. Then, I need to show this % in a report.

The field details whether a quote was on-time or late. 1 = on-time and 0 =
late.

I need the on-time percentage.

Please help me, I'm terrible at math, and this question shoved me over the
edge.

Thank you in advance for talking slowly and for using small words...
 
J

Judi

O.K. now I have to go and complicate things...

I just realized that not every quote has a due date. I have a field now to
show whether there is a requested date or not (again, 1, 0). Any quote that
does not have a due date is showing up in the other column as late.

I need to not count those jobs against the estimators. Is there an equation
or function to cover this whole shebang?

Again, thank you for your help.
 
K

Ken Sheridan

You need to sum an expression which returns 1 if late and has a due date, 0
otherwise. This gives you a count of the relevant jobs. This is then
divided by the count of all jobs and the result multiplied by 100 to give a
percentage.

In a report based on your query an unbound text box in the report footer
would have this expression as its ControlSource:

=Sum(IIf([IsLate] = 1 And [HasDueDate] = 1,1,0))/Count(*)*100

Where Islate and HasDueDate are the column names.

That should give the percentage of late jobs against all jobs, both with and
without due dates. If those without due dates are also to be excluded from
the total against which the percentage is calculated the expression would be:

=Sum(IIf([IsLate] = 1 and [HasDueDate] = 1,1,0))/Sum(IIf([HasDueDate] =
1,1,0))*100

Ken Sheridan
Stafford, England
 
J

Judi

Thank you very much, I apperciate all the help that I get from you and all
the volunteers on this site. I hope that one day I will be able to help
someone.

Ken Sheridan said:
You need to sum an expression which returns 1 if late and has a due date, 0
otherwise. This gives you a count of the relevant jobs. This is then
divided by the count of all jobs and the result multiplied by 100 to give a
percentage.

In a report based on your query an unbound text box in the report footer
would have this expression as its ControlSource:

=Sum(IIf([IsLate] = 1 And [HasDueDate] = 1,1,0))/Count(*)*100

Where Islate and HasDueDate are the column names.

That should give the percentage of late jobs against all jobs, both with and
without due dates. If those without due dates are also to be excluded from
the total against which the percentage is calculated the expression would be:

=Sum(IIf([IsLate] = 1 and [HasDueDate] = 1,1,0))/Sum(IIf([HasDueDate] =
1,1,0))*100

Ken Sheridan
Stafford, England

Judi said:
O.K. now I have to go and complicate things...

I just realized that not every quote has a due date. I have a field now to
show whether there is a requested date or not (again, 1, 0). Any quote that
does not have a due date is showing up in the other column as late.

I need to not count those jobs against the estimators. Is there an equation
or function to cover this whole shebang?

Again, thank you for your help.

Judi said:
Hi, my brain seems to have shut down temporarily and I need help with
something.

I have a field in a query that returns 1 or 0 and I need to find the % of
times that the answer is 1. Then, I need to show this % in a report.

The field details whether a quote was on-time or late. 1 = on-time and 0 =
late.

I need the on-time percentage.

Please help me, I'm terrible at math, and this question shoved me over the
edge.

Thank you in advance for talking slowly and for using small words...
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top