Why Experts Exchange?

Experts Exchange always has the answer, or at the least points me in the correct direction! It is like having another employee that is extremely experienced.

Jim Murphy
Programmer at Smart IT Solutions

When asked, what has been your best career decision?

Deciding to stick with EE.

Mohamed Asif
Technical Department Head

Being involved with EE helped me to grow personally and professionally.

Carl Webster
CTP, Sr Infrastructure Consultant
Ask ANY Question

Connect with Certified Experts to gain insight and support on specific technology challenges including:

Troubleshooting
Research
Professional Opinions
Ask a Question
Did You Know?

We've partnered with two important charities to provide clean water and computer science education to those who need it most. READ MORE

troubleshooting Question

Calculate average in cross tab even if column is zero

Avatar of DarthCook
DarthCook asked on
Crystal Reports
3 Comments1 Solution774 ViewsLast Modified:
A have a database which records incidents on three sites, i want to be able to display a cross tab in crystal reports XI showing the  total number of incidents by site grouped by month and the average. Only problem is the average column doesn't calculate properly here is an example of my cross tab with the summarised columns.

See example of cross tab attatched
      
This is what I get when looking at 3 sites over a 2 month period, in December 07 the average should be 5 ( total of 15 / 3 sites) but as site B didn't have any incidents in December it looks like the report isn't actually counting site b to calculate the average I'm not sure if I can show this using a cross tab?

My database query returns the information for the report in the following format.

ID        Date              Site
1        01/12/2007    site A
2        03/12/2007    Site B

etc..

Any help is greatly appreciated




crosstab-Example.bmp