Hi, I desperately need help with a pivot-table and can't find anyone else who's ever had this problem...I have a very large healthcare data table which for simplicity I will describe as follows. In essence the first two columns respectively are (A) location and (B) month. Let's say the third column (C) is the number of cases of the disease kidpox treated in each health centre during that month. The fourth column (D) is the total number of cases of everything treated during that month in each clinic. The fifth column (E) is the proportion of cases of this disease over all consultations for each health centre and month, and the formula in E2 is
=IF((OR((C2=""),(D2=""))),"",C2/D2) so that if either the denominator or the numerator is missing, the rate will be blank. This gives a table thus:
..A...........B.............C.............D...........E...
..CLINIC......MONTH.........KIDPOX........ALL CASES...RATE
1 Doctorville.Jan 08........100...........200.........50%
2 Nurstown....Jan 08..........0...........300..........0%
3 Doctorville.Feb 08........100
4 Nurstown....Feb 08........200
5 Doctorville.Mar 08
I need to display this data as a pivottable thus:
SUM OF RATE ....MONTH
CLINIC .........Jan 08..... Feb 08.....Mar 08
Doctorsville... 50%
Nursetown .......0%
But when I do the pivottable function the resulting pivottable looks like this:
SUM OF RATE ....MONTH
CLINIC .........Jan 08.....Feb 08.....Mar 08
Doctorsville... 50%........0%.........0%....
Nursetown .......0%........0%
The problem seems to be that even though cells E3, E4 and E5 are blank in the original data table, they aren't actually empty, because they have a formula that returns "" if the formula doesn't give a real number. And it seems that this is responsible for returning the value "0" in the pivottable, making it look like the rate in the clinic is 0% when in fact it's uncalculable as either the denominator or numerator are missing. That's misleading, as I need to be able to tell from the pivottable whether the kidpox rate is 0% or whether it is not calculable owing to missing data in either column C or column D.
If I manually delele the formula in cells E3 to E5 and refresh the pivottable I get displayed what I need, which feeds my suspicion that the presence of a formula that returns "" is somehow messing things up. But I have several thousand rows of data so in reality manual deletion isn't an option.
Many thanks for your suggestions.
=IF((OR((C2=""),(D2=""))),"",C2/D2) so that if either the denominator or the numerator is missing, the rate will be blank. This gives a table thus:
..A...........B.............C.............D...........E...
..CLINIC......MONTH.........KIDPOX........ALL CASES...RATE
1 Doctorville.Jan 08........100...........200.........50%
2 Nurstown....Jan 08..........0...........300..........0%
3 Doctorville.Feb 08........100
4 Nurstown....Feb 08........200
5 Doctorville.Mar 08
I need to display this data as a pivottable thus:
SUM OF RATE ....MONTH
CLINIC .........Jan 08..... Feb 08.....Mar 08
Doctorsville... 50%
Nursetown .......0%
But when I do the pivottable function the resulting pivottable looks like this:
SUM OF RATE ....MONTH
CLINIC .........Jan 08.....Feb 08.....Mar 08
Doctorsville... 50%........0%.........0%....
Nursetown .......0%........0%
The problem seems to be that even though cells E3, E4 and E5 are blank in the original data table, they aren't actually empty, because they have a formula that returns "" if the formula doesn't give a real number. And it seems that this is responsible for returning the value "0" in the pivottable, making it look like the rate in the clinic is 0% when in fact it's uncalculable as either the denominator or numerator are missing. That's misleading, as I need to be able to tell from the pivottable whether the kidpox rate is 0% or whether it is not calculable owing to missing data in either column C or column D.
If I manually delele the formula in cells E3 to E5 and refresh the pivottable I get displayed what I need, which feeds my suspicion that the presence of a formula that returns "" is somehow messing things up. But I have several thousand rows of data so in reality manual deletion isn't an option.
Many thanks for your suggestions.