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!

Cross Tab date Selection?

Status
Not open for further replies.

grecon

Technical User
Mar 8, 2007
78
US
I have a cross tab that compares my customer type sales yearly, what I would like to do is be able to compare it monthly for example I want to compare 2018 Jan - May with 2019 Jan - May. Any suggestions how to do this?

My record selection is this:
{INVOICE.SHIPPED_DT} in {?Starting Date} to {?Ending Date} and
not {ORDERHDR.TEMPSAVE} and
not {ORDERHDR.CANCELLED} and
not {ORDERHDR.PROFORMA} and
not {INVOICE.BADDEBT_FL}

My Parameter Field is :
Starting Date
Ending Date
I have Date interval set to Yearly

Any info would be appreciated Thanks
 
Assuming people would enter Starting Date for the Beginning Year of the range, and the End Date for Ending Year of the range, and that you would be looking at whole, nor partial months, change your record selection to:

(
{INVOICE.SHIPPED_DT} in {?Starting Date} to date(year({?Starting Date}), month({?Ending Date})+1,1)-1 or
{INVOICE.SHIPPED_DT} in date(year({?Ending Date}),month({?Starting Date}),1) to {?Ending Date}
) and
not {ORDERHDR.TEMPSAVE} and
not {ORDERHDR.CANCELLED} and
not {ORDERHDR.PROFORMA} and
not {INVOICE.BADDEBT_FL}

Assuming the date by year is your row field, if you want to compare months within each year, add the date also as a column field and set it to monthly.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top