Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Calc (count) no employees < 7 mo and >= 7 months

Status
Not open for further replies.

RichardWyant

Programmer
Feb 24, 2003
9
US
I want to count how many employees are on Leave from todays date. I want to know how many are on Leave less than 7 months and how many are on leave >= to 7 months. I use a query to pull this information. I pull their effective date from their job data table. Any help to create this formula would be greatly appreciated.
 
Create two formulas:

//{@<7 Months} to be placed in the detail section:
if {table.effectivedate} > dateadd("m",-7,currentdate) then 1 else 0

//{@>= 7 Months}:
if {table.effectivedate} <= dateadd("m",-7,currentdate) then 1 else 0

Insert summaries (SUM, not count) on each formula to get the count in each category.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top