Date Range and Count Formula Help

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.
 
K

KARL DEWEY

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,
 

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