View Single Post
  #1   Report Post  
Posted to microsoft.public.excel.programming
[email protected] anoop.raj@gmail.com is offline
external usenet poster
 
Posts: 1
Default How to calculate total for a column with not all values filled

Hi,

I am trying to get a OWC pivot table running through a Web page. I am
facing an issue while calculating total for one of the Fields. Not all
the cell for this field will have values. I am using the following code
to calculate the total and adding that field to the view.

[code]
Data as XML:
<z:row Classification='Country' CurrentLevel='331' TargetLevel='361'
Acct='9999AXH' Size='0.15' Return='0.26'/

' add data axis
oView.DataAxis.InsertFieldSet oView.FieldSets("Size")

'add total size column
Set totalSize = oView.AddTotal("Size
Total",oView.FieldSets("Size").Fields(0), c.plFunctionSum)
oView.DataAxis.InsertTotal totalAvgSize
[code]

I am getting an error - <b"Function cannot be applied to the given
field" </b. Appreciate your help in this.

Cheers