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 Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Quarterly Data 1

Status
Not open for further replies.

MaumeeScott

Technical User
Jan 29, 2004
25
US
I need to pull data from the current quarter and the previous quarter based on the Current Date. If the current date were in February I would want the 1st quarter of the current year and the 4th quarter of the previous year.

Thanks!
 
Something like the following in the record selection formula should work:

if currentdate in Calendar1stQtr then
{Orders.Order Date} >= dateadd("m",-3,minimum(Calendar1stQtr))
and
{Orders.Order Date} <= maximum(Calendar1stQtr)

else
if currentdate in Calendar2ndQtr then
{Orders.Order Date} >= dateadd("m",-3,minimum(Calendar2ndQtr))
and
{Orders.Order Date} <= maximum(Calendar2ndQtr)

else
if currentdate in Calendar3rdQtr then
{Orders.Order Date} >= dateadd("m",-3,minimum(Calendar3rdQtr))
and
{Orders.Order Date} <= maximum(Calendar3rdQtr)

else
if currentdate in Calendar4thQtr then
{Orders.Order Date} >= dateadd("m",-3,minimum(Calendar4thQtr))
and
{Orders.Order Date} <= maximum(Calendar4thQtr)

-k
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top