Help with Calculation

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I am going to try and explain this the best way I know how....

I have a database that has a total named OB and a table named ER and a table
named Surgery. Within those tables I have questions that are check boxes.
If the check box is checked then a -1 populates. I then created a query of
all of these tables together and did an Abs function to make the -1 a
positive 1. I then created a report from this query. The check boxes
represent 4 different categories.

In my report I need to add up all of the positive ones for each physician.
I am able to accomplish this. My field names for the columns are Total yes
Cat 1, Total yes Cat 2, Total yes Cat 3 and Total yes Cat 4. To get the
total of all of these I do this formula =[Total yes Cat 1]+[Total yes Cat
2]+[Total yes Cat 3]+[Total yes Cat 4]. This formula works fine. Then I
need to get a percentage so I am doing the following formula =[Total yes Cat
1]/[Total yes Cat 1]+[Total yes Cat 2]+[Total yes Cat 3]+[Total yes Cat 4].
For some reason this is not working. I am not sure what I am doing wrong.
Sorry for the long post. Can someone help???? Is this something that can be
learned in an advanced access class???

Thanks
 
I am going to try and explain this the best way I know how....

I have a database that has a total named OB and a table named ER and a table
named Surgery. Within those tables I have questions that are check boxes.
If the check box is checked then a -1 populates. I then created a query of
all of these tables together and did an Abs function to make the -1 a
positive 1. I then created a report from this query. The check boxes
represent 4 different categories.

In my report I need to add up all of the positive ones for each physician.
I am able to accomplish this. My field names for the columns are Total yes
Cat 1, Total yes Cat 2, Total yes Cat 3 and Total yes Cat 4. To get the
total of all of these I do this formula =[Total yes Cat 1]+[Total yes Cat
2]+[Total yes Cat 3]+[Total yes Cat 4]. This formula works fine. Then I
need to get a percentage so I am doing the following formula =[Total yes Cat
1]/[Total yes Cat 1]+[Total yes Cat 2]+[Total yes Cat 3]+[Total yes Cat 4].
For some reason this is not working. I am not sure what I am doing wrong.
Sorry for the long post. Can someone help???? Is this something that can be
learned in an advanced access class???

Thanks

In Math, the order of operation is important.
If memory serves me correctly, Raising to a power and Square Roots are
done first, then multiplication and division, then addition and
subtraction.
In your example the
[Total yes Cat 1]/[Total yes Cat 1]
is done first, and it will always be = 1 (any number divided by itself
is = 1).
Then all the following additions are added to the 1.

Let's assume the actual values are 2,3,4,5.
2/2 = 1+3+4+5 = 13

All you need do is place the additions within parentheses.
Math operations within parenthesis are done first.

=[Total yes Cat 1]/([Total yes Cat 1]+[Total yes Cat 2]+[Total yes Cat
3]+[Total yes Cat 4]).

Correct value:
2/(2+3+4+5) = 2/14 = 0.1428
 
Back
Top