Go Back   Access World Forums > Microsoft Access Discussion > Queries

 
Reply
 
Thread Tools Rate Thread Display Modes
Old 08-12-2013, 02:30 AM   #1
hazell
Newly Registered User
 
Join Date: Jul 2013
Posts: 54
Thanks: 4
Thanked 0 Times in 0 Posts
hazell is on a distinguished road
percentages

Hi,
I have built a query that lists all the members in a group aged 15 to 18. Now I need to build another query that counts a subsection of that group (the number who gained employment in the quarter) and express this as a percentage of the whole of the 15 - 18 group.

I presume I can use the original query to get the number of 15 - 18 year olds. I can write the query to calculate the subset of 15 - 18 year olds who gained employment, but how do I get the total numbers of the groups and express them as a percentage?

thanks for any help. You guys have saved my bacon more than once
Hazell

hazell is offline   Reply With Quote
Old 08-12-2013, 04:24 AM   #2
CazB
Newly Registered User
 
Join Date: Jul 2013
Posts: 309
Thanks: 8
Thanked 69 Times in 69 Posts
CazB is on a distinguished road
Re: percentages

You'll need to use groups and totals... but without a sample of your data it's hard to know exactly what the query would look like... can you post up a sample?


This is an example of a 'similar' query I have in one of my databases... it's based on a single table - the table contains a list of Training course Attendees, including the name of the branch they work for, and a simple Yes/No field (Leftcompany) to show who still works there....

The following query gives me a summary of how many staff on the database work for RMS, how many are 'past' (ie, have left), and then what percentage of the total number that is

SELECT Count(Attendees.[Branch]) AS RMS, Sum(-([leftcompany])) AS Past, Sum(-([leftcompany]))/Count([Branch]) AS [Percent]
FROM Attendees
WHERE (((Attendees.Branch)="rms"));

In the datasheet view, this shows RMS as 88, Past as 25, and Percent as 28.41%


Does that help you at all?

Last edited by CazB; 08-12-2013 at 04:45 AM.
CazB is offline   Reply With Quote
Reply

Thread Tools
Display Modes Rate This Thread
Rate This Thread:

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Percentages AuroX7 Queries 2 04-09-2006 09:07 AM
Fun with percentages Spruk_77 General 2 12-01-2004 09:34 AM
Percentages Spruk_77 Queries 12 11-19-2004 05:42 AM
Percentages dadrew Forms 8 09-29-2004 04:07 AM
Percentages User Name Reports 1 06-12-2003 11:56 AM




All times are GMT -8. The time now is 12:35 AM.


Microsoft Access Help
General
Tables
Queries
Forms
Reports
Macros
Modules & VBA
Theory & Practice
Access FAQs
Code Repository
Sample Databases
Video Tutorials

Featured Forum post


Sponsored Links


Powered by vBulletin®
Copyright ©2000 - 2019, Jelsoft Enterprises Ltd.
(c) copyright 2017 Access World