1 or 2

endri81

Registered User.
Local time
Today, 06:22
Joined
Jul 5, 2010
Messages
121
Hi I have a columns of records which are either 1 or 2.
I need to calculate sum of (1) records and separately sum of (2) records but with conditions of groups.For example for people age 13-19 there are x records(1) and y records (2),for people from 19-35 there are x records (1)and (y ) records 2.

Any help?
 
Can you describe the table structure? We'll need a bit more to go on
 
table People->fields Birthday format dd/mm/yy, Age format number(if you don't know the exact birthday),field Employment(Full time 1,Part time 2)
I need to calculate how many people of age 19-35 are employed part time,how many full time,and the same for people more than 35
 
OK, easy then. Just create a query based on this table. Drag down age and employment (do this one twice). Group by age and employment and count the second employment, you can then specify criteria to get what you want - ie Age is Between 19 and 35.
 
Thx.But how to manage the problem of age if we got sometimes age in numbers like 34,45,56...and sometimes just birthdays i.e 01/02/1981
 
Best way to do that is to make age a calculated field so you've always got a number to go by. Or, use
Code:
Ageinyears:format(now()-[DOB],"yy")
as the age field in your query.
 

Users who are viewing this thread

Back
Top Bottom