Home |
Search |
Today's Posts |
|
#1
![]() |
|||
|
|||
![]()
hi everyone!
does anyone know if it is possible to remove the "(All)" or "(Show All)" from a pivot table. here's a piece of my code for setting up the first element of each pagefeild items, but I would also want to remove the field "(All)" With ActiveWorkbook.PivotCaches.Add (SourceType:=xlExternal) .Connection = strConnection .CommandType = xlCmdSql .CommandText = "exec fc_GetViewAsDenormalizedTable @View_id=" & intViewID & ", @tableset=" & intTableset .CreatePivotTable TableDestination:=ActiveSheet.Range("A3"), TableName:="PivotTable1", DefaultVersion:=xlPivotTableVersion10 End With Set pt = ActiveSheet.Range("A3").PivotTable For Each ptField In pt.PivotFields If LCase(ptField.Name) < "data_id" And LCase (ptField.Name) < "usertable_login" And LCase (ptField.Name) < "view_id" And LCase(ptField.Name) < "transfert_date" And LCase(ptField.Name) < "control_code" Then Select Case LCase(ptField.Name) Case "cou" ptField.Orientation = xlRowField Case "country" ptField.Orientation = xlRowField Case "dcountry" ptField.Orientation = xlRowField Case "yea" ptField.Orientation = xlColumnField Case "year" ptField.Orientation = xlColumnField ptField.ShowAllItems = False Case "data_value" pt.AddDataField ptField Case Else ptField.Orientation = xlPageField strFirstMember = ptField.PivotItems(1) ptField.CurrentPage = strFirstMember End Select End If Next ptField pt.RowGrand = False pt.ColumnGrand = False pt.NullString = ".." |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Using a Pivot Table Calculated Field to get a Unique Count | Excel Worksheet Functions | |||
How to remove Drop Page Fields Here from Pivot Table | Excel Discussion (Misc queries) | |||
pivot table | Excel Worksheet Functions | |||
Removing errors from a Pivot table | Excel Discussion (Misc queries) | |||
Problem with Pivot Table Drop-Down Menus | Excel Worksheet Functions |