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

incorrect crosstab column and grand totals crystal 11

Status
Not open for further replies.

sfabry

Technical User
Feb 28, 2012
46
US
thread149-431823
I am having the same problem as the above poster - but the thread was never resolved. My counts are too low and when exported to excel and summed they are correct. I am not grouped or sorted on anything and some of the other columns DO add up correctly. I am also fairly certain linking is not the culprit. Any ideas?
 
Why don't show a sample of what you are getting? And of what you would instead expect.

What are you using for a summary field, and type of summary?

-LB
 
INPATIENT OUTPATIENT Total INPATIENT OUTPATIEN Total
Total 164 275 439 162 262 424
ANESTHESIA 0 24 24 0 37 37
BARIATRIC 0 0 0 1 0 1
CARDTHOR 7 7 14 8 5 13
COLORECTAL 2 2 4 0 1 1
DIAGNOSTIC 0 0 0 11 15 26
ENT 6 57 63 4 65 69
GASTRO 0 0 0 0 0 0
GENERAL 68 58 126 40 49 89
MEDICINE 12 2 14 10 5 15
NEURO 16 7 23 10 0 10
OBGYN 2 10 12 3 1 4
OPHTH 1 26 27 0 32 32
ORTHOPEDIC 35 35 70 47 31 78
PLASTIC 0 9 9 0 8 8
PODIATRY 0 13 13 0 10 10
UROLOGY 15 25 40 24 2 26
VASCULAR 3 0 3 5 1 6
167 275 442 163 262 425
the summarized field is just a disctince count. im sorry i couldnt get this to look nicer, i will have to attach at home if you cant make sense of it.
 
I think the issue is that your summary field appears in more than one row. A distinct count would count the field only once. Therefore the total row is correctly less than the sum of individual row counts.

-LB
 
I am not sure I follow...shouldn't the "total row" just be the sum of the column?
 
Let's say you are counting patients using a distinctcount on a patientID field. If a patient received services in two categories (rows), they would contribute to the distinctcount within each row, but a distinctcount at the grand total would count that patient only once--meaning that the grand total could be less than the sum of the rows.

-LB
 
Oh, OK. I had not thought of it like that at all. How do you have a different summary in the total field so that it sums what ever summary is in the row/column?
The other thing that is throwing me off is that the numbers I am checking against are not a distinct count but those totals are more closely matching the distinct count than the regular count...
 
I don't know what you are saying. You said the crosstab used a distinct count. I can't help you with a comparison to some other source of data.

-LB
 
no, i am just using another program to check certain aspects of the data - i am not looking to compare between different sources. my point was that is throwing me off in how i am reading the data in the crosstab.
 
What you can do create a formula that combines the field you are currently using in your DistinctCount with the field you are grouping on as the ROW field in your Cross-tab. Do a distinct count of that formula instead of the field you are using now. The row totals should be the same, but the grand total will be the sum of the rows. Just understand that the new grand totals will 'foot' correctly, but will be double counting in some cases.

Ken Hamady, On-site Custom Crystal Reports Training & Consulting
Public classes and individual training.
Guides to Formulas, Parameters, Subreports, Cross-tabs, VB, Tips and Tricks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top