cancel
Showing results for 
Search instead for 
Did you mean: 

CrossTab Issue

cothmer
Participant
0 Kudos

I have a crosstab in my report that calculates average LOS. However, I am not getting the correct avg. I have 2 patients, one was here for 3 days and one was here for 4 days, which would be a total of 7. However, I am getting the average as 3.67 when it should be 3.5.

Accepted Solutions (0)

Answers (4)

Answers (4)

cothmer
Participant
0 Kudos

I just want to add up the 2 rows that are 3 and 4 in bold on the screenshot and then get an avg. So it would be a total of 7 divided by 2 for 2 patients and the avg is 3.5. My crosstab keeps adding rows multiple times, etc.....

cothmer
Participant
0 Kudos

I added a summary (attached) but the summary counts each row for the patient. I have the patient info in a group. So for example: patient1 was here 3 days and patient2 was here 4 days. If I put the patient info in the details section then patient1 shows up 3 times and patient2 shows up 4 times that's why they are in a group so it only pulls the patient 1 time. The summary is adding patient1 3 times for a total LOS of 9 when it should be 3. Patient2 shows up 6 times in the details section and the summary shows a total LOS of 24. Can a summary not add up the LOS when the information is in a group ? The total LOS for both patients should be 7.

vitaly_izmaylov
Employee
Employee
0 Kudos

works in my test in CR 2013 SP7:

What I am doing differently?
vitaly_izmaylov
Employee
Employee
0 Kudos

Strange behaviour.

Are the fields in your formula in Date or DateTime format?

What is the version of your Crystal Reports?

I will try to reproduce the issue.