Skip to Content
0

CrossTab Issue

Nov 22, 2016 at 04:45 PM

45

avatar image

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.
crosstab.jpg (23.5 kB)
formula.jpg (15.6 kB)
10 |10000 characters needed characters left characters exceeded
* Please Login or Register to Answer, Follow or Comment.

4 Answers

Vitaly Izmaylov
Nov 24, 2016 at 06:46 PM
0

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.

Share
10 |10000 characters needed characters left characters exceeded
Vitaly Izmaylov
Nov 24, 2016 at 07:07 PM
0

works in my test in CR 2013 SP7:

What I am doing differently?

Share
10 |10000 characters needed characters left characters exceeded
Curt Othmer Dec 01, 2016 at 04:39 PM
0

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.


summary.jpg (24.5 kB)
each-row.jpg (12.6 kB)
Share
10 |10000 characters needed characters left characters exceeded
Curt Othmer Dec 05, 2016 at 06:48 PM
0

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.....


cross-tab.jpg (24.9 kB)
Share
10 |10000 characters needed characters left characters exceeded