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

Crosstab issue by Quarter and Year 1

Status
Not open for further replies.

tannedguy29

Technical User
Apr 13, 2009
5
CA
CR X1R2
I have a Crosstab that has the rows set to group by Quarter for(date.field) and the Columns set to same field but grouped by Year. I'm trying to show calls received by quarter for each year. It's doing the count on calls (report.calls).

The issue I'm having is that the Quarter rows are repeating throughout for every year as it seems to be part of the date.
I tried a datepart formula I found searching here and that would then remove all of the extra rows but rename them to Q1.00, Q2.00 etc... Is there one simple formula to only have the Quarters group by just the 4 Months by name? I's liek to have only 4 rows (Quarters) and the Yearly columns.
 
DatePart would give you quarters regardless of year, if that's what you want. But I can't see how you'd be able to mix them with years in a crosstab.

You could do it as two crosstabs, of course.

[yinyang] Madawc Williams (East Anglia, UK). Using Windows XP & Crystal 10 [yinyang]
 
Instead of grouping by date on change of quarter, you should create a formula to use as your row field:

datepart("q",{table.date})

-LB
 
lbass - thanks that's what I had used but the result was that the Quarters were not in order so I thought it might be easier to convert to a month. Forget that!! I think it's a lot easier for me to leave as Q1, Q2, etc... but I'd like to have them in some type of sort order. The icing on the cake will be to drop the decimals also. Right now it appears as:
Quarter 2006 2007 2008 2009 Total
3.00 (n calls) (x calls)
4.00
1.00
2.00

n = the amount for that Quarter per year.
x = total calls for that Quarter across all years.
I looked at it and the sorting appears to be based on the number of calls lowest - highest for the Total column. I'd like it to be based on logical Quarter sort, i.e 1-4.
I've tried to sort via Record Sort Expert for that field but it doesn't do anything.
 
It sounds like you have a group sort on the crosstab. While the crosstab is selected, go to report->group sort and change the sort to No Sort. If there is no group sort, within the crosstab expert, highlight the rowfield->group options and make sure it is set to ascending order.

Change the number display by right clicking->format field->number->choose: -1123.

-LB
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top