Counting in Report

S

sixschultzz

Hi, I'm trying to get a count of ages within a specific range in my report;
like greater than or equal to 16 y.o. when I have to figure the age by
taking the date an item was ordered minus the date of birth divided by 365
days, I have tried different variations of =Count(([dateordered]-[date of
birth])/365)>=16, and have tried =IIf((([dateordered]-[date of
birth])/365)>="16",[Count(([dateordered]-[date of birth])/365)," ") but have
been unsuccessful; any suggestions?
 
S

sixschultzz

Karl,
Thank you for the suggestion, but it didn't work, it did give me some more
ideas to play with; still I'm unsuccessful at completing the report. Thank
you again, if you have any other ideas please shoot them to me.
Dave

karl dewey said:
Try this --
=Sum(IIF(([dateordered]-[date of birth])/365)>=16,1,0)
--
KARL DEWEY
Build a little - Test a little


sixschultzz said:
Hi, I'm trying to get a count of ages within a specific range in my report;
like greater than or equal to 16 y.o. when I have to figure the age by
taking the date an item was ordered minus the date of birth divided by 365
days, I have tried different variations of =Count(([dateordered]-[date of
birth])/365)>=16, and have tried =IIf((([dateordered]-[date of
birth])/365)>="16",[Count(([dateordered]-[date of birth])/365)," ") but have
been unsuccessful; any suggestions?
 
K

karl dewey

You can only use the Sum in a header or footer, not in detail.
You can also use it in a totals query.
--
KARL DEWEY
Build a little - Test a little


sixschultzz said:
Karl,
Thank you for the suggestion, but it didn't work, it did give me some more
ideas to play with; still I'm unsuccessful at completing the report. Thank
you again, if you have any other ideas please shoot them to me.
Dave

karl dewey said:
Try this --
=Sum(IIF(([dateordered]-[date of birth])/365)>=16,1,0)
--
KARL DEWEY
Build a little - Test a little


sixschultzz said:
Hi, I'm trying to get a count of ages within a specific range in my report;
like greater than or equal to 16 y.o. when I have to figure the age by
taking the date an item was ordered minus the date of birth divided by 365
days, I have tried different variations of =Count(([dateordered]-[date of
birth])/365)>=16, and have tried =IIf((([dateordered]-[date of
birth])/365)>="16",[Count(([dateordered]-[date of birth])/365)," ") but have
been unsuccessful; any suggestions?
 

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