Counting in Report

  • Thread starter Thread starter sixschultzz
  • Start date Start date
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?
 
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?
 
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?
 
Back
Top