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

crosstab compare years

Status
Not open for further replies.

bgon1

Technical User
Nov 5, 2005
11
CA
thread149-1570816
Can this be done in a crosstab? I want to compare the same period in the current year vs. prior years.
eg.
mar 1-7 2011 mar 1-31 2010 ... 09 ...08
cust1 |------------ | ------------
cust2 | |
cust3 | |
--------------------------------
furthermore i wanted to input the dates using a parameter field if possible and then schedule this report to run weekly.

Any ideas would be appreciated.
 
You could do Year(currentdate) and Year(currentdate)-1. Use these values for total grouped by customer. (Not sure if it can also be done in crosstab.)

[yinyang] Madawc Williams (East Anglia, UK). Using Crystal 11.5 with SQL and Windows XP [yinyang]
 
In the "on change of" section, add month as your first column, and year as the second column.

-LB
 
When looking at the crosstab expert, i can create the two columns and I have the group options. I can't find the "on change of" (although I've seen it before). So in doing the report I've got the monthly column summary. What I can't do is select one month specifically and compare it to this year same month.
Hope that's clear.
 
Sorry, I meant in the column area--and you have to actually use a formula for month:

month({table.date})

Add that first, and then add a formula for year:

year({table.date})

...as your second column field.

-LB
 
Thanks Ibass. I'll try that tomorrow.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top