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

week date range for current year and last year

Status
Not open for further replies.

eoggb

Programmer
Feb 2, 2006
20
CA
i have a date param in the main report and need to see sales for a week based on the date pram for the current year and last fiscal year.

ELSE IF {?DateRangeType} = "Weekly" then
if({?Date })in Last7Days then
if ({MMS_Store_Region_vw.Region}="USA")then
{DailySales_Summary_vw.Sales}* {?ExchRate}
else
{DailySales_Summary_vw.Sales}

I am using this for the current year, how can i incoperate this for the last fiscal year using this field to pull the fiscal year....{Lwi_Periods.Fiscal_Year}

thanks
 
Nothing in your formula ties the parameters to an actual date. What is your datefield? And what datatype is it?

-LB
 
my date feild is {DailySales_Summary_vw.SalesDate} (a datetime)
 
I'm not sure what you're looking for for last year--would be the exact same dates? Or would it be the corresponding week? Try one of these and see which meets your needs:

if {DailySales_Summary_vw.SalesDate} in
dateadd("yyyy",-1,minimum(last7days)) to
dateadd("yyyy",-1,maximum(last7days)) then //etc.

if {DailySales_Summary_vw.SalesDate} in
dateadd("ww",-52,minimum(last7days)) to
dateadd("ww",-52,maximum(last7days)) then //etc.

-LB

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top