Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Excel / New Users / March 2008

Tip: Looking for answers? Try searching our database.

PivotTable Filter Automaticly adds new data

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
erdal akbulut - 20 Mar 2008 12:45 GMT
Hi,

I have a strange problem.

MS Excel 2003 pivot table linked to SSAS 2005 Cube.  One of the dimensions
let's say Customer is filtered on the pivot table. 5 from total of 100
Customers are selected in filter.  Next day assume 2 new customers added to
customer dimension and when the pivot refreshed those 2 new customers are
automaticly added to filter and the result is 7 customers selected out of
102 total.

Do you know any ways to prevent this and keeping the only original filter
without adding new records?

Thanks in advance

erdal
bart.strubbe@scarlet.be - 20 Mar 2008 13:57 GMT
> Hi,
>
[quoted text clipped - 13 lines]
>
> erdal

this is a macro I made to filter accounts that are (almost) equal to 0
in a pivottable. I don't know your pivot, but you can make it work in
your.
If you have problems, send an example to my emailadress

Sub VerbergenPivotItems()
Sheets("pivot").Select
Dim item, rngTableItem As Range, Terr As Boolean
[A5].Select 'ga zeker ergens in de draaitabel staan
For Each item In
ActiveSheet.PivotTables("PivotTable1").PivotFields("grootboekr.").PivotItems
 On Error GoTo fout
 Terr = False
 Set rngTableItem = ActiveCell.PivotTable.GetPivotData("bedrag",
"grootboekr.", item.Value)
 On Error GoTo 0
 If Not Terr Then
   If Abs(rngTableItem.Value) < 0.0001 Then

ActiveSheet.PivotTables("PivotTable1").PivotFields("grootboekr.").PivotItems(item.Value).Visible
= False
   End If
 End If
Next
fout:
If Err.Number = 1004 Then Terr = True: Resume Next
End Sub

greetings

bart
erdal akbulut - 21 Mar 2008 11:51 GMT
> Hi,
>
[quoted text clipped - 13 lines]
>
> erdal

Ok, I have recorded a macro while doing some filtering, here is the result.

ActiveSheet.PivotTables("PivotTable1").PivotFields("[Cusstomer]"_
       ).HiddenItemsList = Array("[AAA]", _
       "[BBB]", _
       "[CCC]")

So appereantly Excel keeps a hidden item list when filtering therefore it is
normal that new items appearing in the filter cause they are not included in
the hiddenitemlist.

While working on owc I have used allincludeexclude property and
includeditems collection to filter reports programaticly, I could not find
similar in Excel Pivot Tables.

Does somebody know equalients of allincludeexclude property and
includeditems collection of OWC in excel ?

Thanks,

erdal

Rate this thread:






 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.