Help with Calculate % (PLEASE HELP!!!!!!!!!!!!!!!)

C

Chris

Calculate %

I need some help with calculating the % --

This is what I have thus far --- I created a query and for one of the column
I did a ‘count’ Now I will like to add another column in my query and take
the column I did a count on and divided it by the total number of records in
the same column.

Is this possible


Thanks in advance

Chris
 
D

Duane Hookom

You can use a subquery as the denominator in your expression. Something
like:

SELECT Dept, Gender, Count(*) as NumOf, Count(*)/(SELECT Count(*) FROM
tblEmployees) as PctOf
FROM tblEmployees
GROUP BY Dept, Gender;
 

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