Date Range and Count Formula Help

  • Thread starter Thread starter Jimmy
  • Start date Start date
J

Jimmy

I have a query that has a date referred field. I have a report that I'm
building that counts the ytd referrals and I need to create a formula that
counts the previous 30 days referrals. I've tried everything and nothing is
working. Can I create a formula that pulls the previous 30 days of referrals
and counts them? I'm not sure how to create this formula.
 
Did my post yesterday not do what you wanted?

SELECT Sum(IIF([Corporate Investment Services Referral Tracking].[Date
Referred] Between Date() AND DateSerial(Year(Date()),1,1), 1,0)) AS ytd,
Sum(IIF([Corporate Investment Services Referral Tracking].[Date Referred]
Between Date() AND DateSerial(Year(Date()),Month(Date()),1), 1,0)) AS mtd,
 
Back
Top