Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default PivotTable columns not going Invisible

I have a pivot table in Excel 2000 based on an OLAP cube.
There is one field on the column of the PT
called "StoreName". There are 20 StoreNames on the cube
but I want only 5 to appear on the PT.

When I build this PT, all 20 come over from the cube. I
was anticipating that the visible property of the
PivotItem object might allow me to see only the StoreNames
I want by setting the others invisible with something like
this:

'pt is the pivot table
Dim pf as PivotField
Dim pi as PivotItem
For Each pf In pt.VisibleFields
If pf.Orientation = xlColumnField Then
For Each pi In pf.PivotItems
If Left(pi.name,1) = "N" Then
pi.Visible = False
End If
Next
End If
Next

I get "Run-time error 1004. Application-defined or object-
defined error" as this line: pi.Visible = False.

This works if the PT source is something besides a cube.
I'm hoping you might know how to do this for a cube.

Thanks,
Stoney
Reply
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
PivotTable Sum 2 Columns Mouimet Excel Worksheet Functions 1 November 20th 09 12:55 AM
How do I get PivotTable data results to show in columns instead ro GeorgeK@Novagard Excel Discussion (Misc queries) 4 April 23rd 08 06:36 PM
Creating a PivotTable w/o selecting data in an existing PivotTable Damian Excel Discussion (Misc queries) 6 November 2nd 07 04:44 PM
Pivottable columns multiply in excel 2007 Haffi Excel Worksheet Functions 1 August 21st 07 04:32 AM
Show % between two columns in a pivottable dq Excel Worksheet Functions 2 May 7th 07 06:46 PM


All times are GMT +1. The time now is 09:26 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"