Calculation in a query (1 Viewer)

aattas

Registered User.
Local time
Tomorrow, 00:33
Joined
Dec 24, 2014
Messages
74
Hello.
I have a case of calculation of addition and division, I need to show the result in a report as follows:
Cat1=3
Cat2=4
Cat3=5
Total of Insp: 20

The calculation should do the following:

Cat1 +Cat2 +Cat3 / Total of Insp.

Should I do this in a query or VBA?

Thanks
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:33
Joined
May 7, 2009
Messages
19,229
you do it in query.
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:33
Joined
Oct 29, 2018
Messages
21,454
Hi. Are Cat1, Cat2, and Cat3 names of your fields?
 

aattas

Registered User.
Local time
Tomorrow, 00:33
Joined
Dec 24, 2014
Messages
74
Wow. Thanks for the reply. But can u show me how it is done?. Please
 

arnelgp

..forever waiting... waiting for jellybean!
Local time
Tomorrow, 05:33
Joined
May 7, 2009
Messages
19,229
select (cat1 + cat2 + cat3)/[total of insp] as ColumnName;
 

theDBguy

I’m here to help
Staff member
Local time
Today, 14:33
Joined
Oct 29, 2018
Messages
21,454
Yes. There are fields.

Thanks
Okay. Ignoring the apparent issue with normalization, give Arnel's suggestion a try and let us know if it works for you.
 

Users who are viewing this thread

Top Bottom