LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
ion ion is offline
external usenet poster
 
Posts: 12
Default PivotTable: Averaging over 0 (Null) Fields

Hi! I'm counting things in my database. So I get records like
fleem spork morgo darp
a 1 ˜º 2
b 1 ˜º 4
c 1 ˜º 9
a 2 ˜º 4
c 2 ˜º 2
a 1 ˜¼ 1
b 1 ˜¼ 5
c 1 ˜¼ 2
a 2 ˜¼ 3
b 2 ˜¼ 0
c 2 ˜¼ 4

in my query, where 'darp' is my aggregate. So, I load this into my
pivot table with a little VBA, and I include the line
' show zero for the null fields
pt.NullString = "0"
OK? I now have a pivottable that looks like
Sum of darp morgo
spork fleem ˜º ˜¼
1 a 2 1
b 4 5
c 9 2
1 Sum 15 8
1 Average 5 2.666666667
2 a 4 3
b 0 0
c 2 4
2 Sum 6 7
2 Average 3 2.333333333


Now, I want to get the average of darp over a fleem. But, since there
is no spork = 2 value defined for fleem=b and morgo=˜º, the average of
all darp over spork=2 is (4+2)/3 = 3, not (4+2+0)/3 = 2. For spork = 2,
fleem = b, morgo=˜¼, the 0 is defined and behaves correctly.

How can I get this query to treat that missing value as a zero value?
I'm trying calculated fields, but they seem not to have subtotals at
all.

 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Help with calulating Null fields Roderic Excel Worksheet Functions 3 August 11th 08 10:29 PM
Pivottable Sum of fields. Saviz Excel Discussion (Misc queries) 1 July 17th 08 12:10 PM
Fields in recordset from Access with value Null (empty fields) Mats Nilsson Excel Programming 2 September 20th 06 05:51 PM
averaging 32 fields tee Excel Worksheet Functions 5 July 16th 06 12:24 AM
PivotTable (blank) cells won't display NULL! Abdul Malik Said Excel Programming 3 March 24th 05 08:32 PM


All times are GMT +1. The time now is 02:47 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"