261
Addressing Issues with Two or More Data Fields
11
Figure 11.14
The virtual Data dimen-
sion contains two fields
from your dataset plus a
calculation.It is shown
along the column area of
the report.
continues
Listing 11.5 Code That Adds a New Item Along the Product Dimension
Sub CalcItemsProblem()
‘ Listing 11.5
Dim WSD As Worksheet
Dim PTCache As PivotCache
Dim PT As PivotTable
Dim PRange As Range
Dim FinalRow As Long
Set WSD = Worksheets(“PivotTable”)
Dim WSR As Worksheet
‘ Delete any prior pivot tables
For Each PT In WSD.PivotTables
PT.TableRange2.Clear
Next PT
WSD.Range(“R1:AZ1”).EntireColumn.Clear
12_0789736012_CH11.qxd 12/11/06 6:26 PM Page 261