Trying to compare the overall average and median of a field in my report to the average for one of the groups.
Field is # of months, and the data has been grouped by a group called Aging into two values fresh and aged. I want to calculate the average and median number of months for just the Fresh group, and display it in a chart along with the average and median values for the entire report.
The calculations work in the Aging group footer, but don't when I try to use them in the report footer.
The problem comes when I try the following syntax:
if aging = "Fresh" then # of Months
This puts a zero in rows where the aging value is not Fresh, and these are included in the calculation, when I don't want them. I can see that the sum would still work correctly, but the average and median functions do not.
How to build a formula for median and average that only takes the rows from the Fresh group into consideration?
FWIW--I am using crystal XI
Thanks
kirk
Field is # of months, and the data has been grouped by a group called Aging into two values fresh and aged. I want to calculate the average and median number of months for just the Fresh group, and display it in a chart along with the average and median values for the entire report.
The calculations work in the Aging group footer, but don't when I try to use them in the report footer.
The problem comes when I try the following syntax:
if aging = "Fresh" then # of Months
This puts a zero in rows where the aging value is not Fresh, and these are included in the calculation, when I don't want them. I can see that the sum would still work correctly, but the average and median functions do not.
How to build a formula for median and average that only takes the rows from the Fresh group into consideration?
FWIW--I am using crystal XI
Thanks
kirk